-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_aliasses
88 lines (81 loc) · 2.46 KB
/
dot_aliasses
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
# move around
alias cdw='cd ~/Work'
alias cdr="cd ~/Work/github.com"
alias goplay='cd ~/Work/playground'
alias gotmp='cd /tmp'
# search
alias rgcpp='rg -tcpp'
alias rgcmake='rg -tcmake'
alias rgtext='rg -ttxt'
alias rgconf='rg -tconfig -tyaml -tjson -txml'
alias rgsh='rg -tsh'
alias rgpy='rg -tpy'
# git
alias ga='git add'
alias gbr='git branch'
complete -F _complete_alias gbr
alias gbrD='git branch -D'
complete -F _complete_alias gbrD
alias gc='git c'
complete -F _complete_alias gc
alias gcam='git cam'
complete -F _complete_alias gcam
alias gcm='git cm'
complete -F _complete_alias gcm
alias gpatch='git commit --amend'
alias gfixup='git commit --amend --no-edit'
alias gp='git push'
complete -F _complete_alias gp
alias gr='git rebase'
complete -F _complete_alias gr
alias gd='git diff'
complete -F _complete_alias gd
alias gdt='git difftool'
complete -F _complete_alias gdt
alias gco='git checkout'
complete -F _complete_alias gco
alias gcp='git cherry-pick'
complete -F _complete_alias gcp
alias gs='git status -s'
alias gtree='git tree'
alias gadog='git adog'
alias gf='git fetch'
alias gfa='git fetch --all --prune'
alias gfo='git fetch origin'
alias clone='git_clone'
# docker
alias dc='docker-compose'
alias dcu='docker-compose up -d'
alias dcb='docker-compose up -d --build'
alias dstats='docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"'
alias dports='docker ps --format "table {{.Names}}\t{{.Ports}}"'
alias garbage-collect-docker='docker rm $(docker ps -aq)'
alias dl='docker logs -ft'
complete -F _complete_alias dl
alias dps='docker ps --format "table {{.Image}}\t{{.ID}}\t{{.Ports}}\t{{.Names}}"'
alias dimgs='docker images'
complete -F _complete_alias dimgs
alias dvol='docker volume'
complete -F _complete_alias dvol
alias dnet='docker network'
complete -F _complete_alias dnet
alias dsys='docker system'
complete -F _complete_alias dsys
# misc
alias apti='sudo apt install'
complete -F _complete_alias apti
alias aptu='sudo apt update && sudo apt upgrade -y'
alias snapu='sudo snap refresh'
alias snapi='sudo snap install'
complete -F _complete_alias snapi
alias root='sudo su - root'
alias vimu='vim +PlugInstall +PlugClean +PlugUpdate +UpdateRemotePlugin'
alias count_endpoint_verbs="yq 'reduce .paths[] as \$item (0; . + (\$item | length))'"
if hash exa &>/dev/null; then
alias ls='exa'
alias l='exa -F'
alias ll='exa -al'
alias llmod='exa -al --sort=modified --reverse'
fi
# ascii art
alias no-idea='echo "¯\_(ツ)_/¯"'