-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bash_aliases
106 lines (95 loc) · 2.53 KB
/
.bash_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
# Preferences
alias ls='ls --group-directories-first --color'
alias la='ls -A'
alias ll='ls -lhT'
alias grep='grep --color'
alias screen='screen -U'
# Safeties
alias sl='ls'
alias tial='tail'
alias suod='sudo'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias info='info --vi-keys'
alias view='vim -R'
# Shortcuts
alias L='less' # Intended to be used like `foo|L`
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias ?='echo ${PIPESTATUS[@]}'
alias scr='screen -r'
alias sc='screen '
alias t='tmux'
alias ta='tmux attach-session'
alias td='tmux detach-client'
alias open='xdg-open'
alias clip='xclip -selection clipboard -i'
alias c='vis-clipboard --copy'
alias v='vis-clipboard --paste'
alias rc='. ~/.bashrc'
alias py='python3'
alias py2='python2'
alias p='pushd'
alias o='popd'
alias mvs='mv-recent-screenshots'
alias mvd='mv-recent-downloads'
# Miscellaneous
alias go-ssh='eval $(ssh-agent) ; ssh-add'
alias mktxt="$EDITOR $(date +%Y%m%d).txt"
alias garbage="cat /dev/urandom | tr -cd '\43-\171'"
alias pdate='date +%Y%m%d'
alias tstamp="date +%Y%m%d%H%M%S"
alias ustamp="date +%s"
alias ipa='ip addr | grep global | awk "{print $2}"'
alias ipl='ip link'
alias ipr='ip route'
alias no-comment="grep -v '^ *#\|^$'"
# Git shortcuts
alias gg='git-grab'
alias gita='git add .'
alias gits='git status'
alias gitd='git diff'
alias gitc='git commit'
alias gitl='git log'
alias gitp='git push'
alias gitu='git pull'
alias gitb='git branch'
alias gitr='git remote'
# Vagrant shortcuts
alias vs='vagrant status'
alias vu='vagrant up'
alias vr='vagrant reload'
alias vd='vagrant destroy'
alias vdu='vagrant destroy -f ; vagrant up'
alias vsg='vagrant global-status'
alias vba='vagrant box add'
alias vbl='vagrant box list'
alias vbu='vagrant box update'
alias vssh='vagrant ssh'
alias vpsh='vagrant powershell'
alias vrdp='vagrant rdp'
# Docker shortcuts
alias d='docker'
alias ds='docker ps -a'
alias dsh='docker ps --format "table {{.Names}}\t{{.Status}}"'
alias dr='docker run'
alias de='docker exec'
alias dp='docker pull'
alias dui='docker images --format="{{print (.Repository) \":\" (.Tag) }}" | xargs -n1 docker pull'
# Kubernetes shortcuts
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgn='kubectl get nodes'
alias kgs='kubectl get services'
alias kx='kubectl exec -it'
# Minikube shortcuts
alias m='minikube'
# In case there local aliases I'd rather not publish to Github
if [ -f ~/.bash_aliases.local ] ; then
. ~/.bash_aliases.local
fi
# vim: filetype=sh:ts=2:sw=2:expandtab