-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
120 lines (104 loc) · 3.05 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Shell aliases
# Development
alias py='/usr/local/bin/python3'
alias m='python manage.py'
alias stl='stellar'
alias pg_restore='nocorrect pg_restore'
# Git stuff
alias g='git'
alias ga='git add --update .'
alias gaa='git add --all .'
alias gbr='git branch'
alias gbra='git branch --all'
alias gcam='git commit --amend --message'
alias gci='git commit --all --message'
alias gcm='git commit --message'
alias gcp='git cherry-pick'
alias gdeb='git difftool --dir-diff'
alias gdesb='git difftool --dir-diff --staged'
alias gfo='git fetch origin'
alias gfu='git fetch upstream'
alias gg='git grep -I --line-number --heading'
alias gl='git pull'
alias glnr='git pull --no-rebase'
alias glo='git log --abbrev-commit | bbedit --clean --view-top --resume --pipe-title Log.txt'
alias glom='git log --oneline --author=frjo | bbedit --clean --view-top --resume --pipe-title Log.txt'
alias gmn='git merge --no-ff'
alias gp='git push'
alias gpo='git push --set-upstream origin'
alias grm='git rebase origin/master'
alias gsl='git stash list'
alias gst='git status --short --branch'
alias gswm='git switch master'
gde () {
git diff --patch-with-stat $1 | bbedit --clean --view-top --resume --pipe-title Diff.patch
}
gdes () {
git diff --staged --patch-with-stat $1 | bbedit --clean --view-top --resume --pipe-title Diff.patch
}
gro () {
git fetch origin && git reset origin/$1 --hard
}
gsa () {
git stash apply stash@{$1}
}
gss () {
git stash save "$@"
}
gra () {
git remote add $2 [email protected]:$2/$1.git
}
gsw () {
git switch $1 || git switch --create $1
}
# lazygit stuff
alias lg='lazygit'
# tig stuff
alias t='tig'
alias tst='tig status'
# Some good shorcuts
alias .='pwd'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias cd..='cd ..'
alias rm='rm -i'
alias cp='cp -i'
alias mv='nocorrect mv -i'
alias l='ls -lhaFG'
alias ll='ls -lhaF | less'
alias lt='ls -lhatFG'
alias llt='ls -lhatF | less'
alias lz='ls -lhaSFG'
alias llz='ls -lhaSF | less'
alias c='cd . && clear'
alias e='exit'
# cd shortcuts
alias pd='pushd'
alias bd='popd'
alias cdd='cd ~/Downloads/'
alias cdde='cd ~/Desktop/'
# cd's to frontmost window of Finder
cdf () {
cd "`osascript -e 'tell application "Finder"' -e 'set myname to POSIX path of (target of window 1 as alias)' -e 'end tell' 2>/dev/null`"
}
# BBEdit stuff
alias edit='bbedit'
alias bb.='bbedit .'
alias bbp='bbedit --clean --view-top --resume --pipe-title Temp.txt'
alias bbd='bbedit --clean --view-top --resume --pipe-title Diff.patch'
# Things to long to type/remember
alias realias='bbedit --wait --resume ~/.bash_aliases; source ~/.bash_aliases'
alias tx='/usr/bin/tar -xvzf'
alias ca='cd ~ ; winname Terminal; clear'
alias topl='top -u -F -R -s 2'
alias o='open'
alias o.='open .'
alias netstati='netstat -f inet | bbedit --clean --view-top --resume'
alias netstatr='netstat -rn | bbedit --clean --view-top --resume'
alias lsofi='lsof -nPi | bbedit --clean --view-top --resume'
alias digl='dig @127.0.0.1'
alias digx='dig -x'
alias uuidgen='uuidgen | tr "[:upper:]" "[:lower:]"'