format abbrs

This commit is contained in:
Noah Masur 2021-11-24 17:12:26 -05:00
parent 21333baefd
commit 3a04b58574

View File

@ -3,11 +3,11 @@
function abbrs --description 'All abbreviations' function abbrs --description 'All abbreviations'
# Directory aliases # Directory aliases
abbr -a l 'ls' abbr -a l ls
abbr -a lh 'ls -lh' abbr -a lh 'ls -lh'
abbr -a ll 'ls -alhF' abbr -a ll 'ls -alhF'
abbr -a lf 'ls -lh | fzf' abbr -a lf 'ls -lh | fzf'
abbr -a c 'cd' abbr -a c cd
abbr -a -- - 'cd -' abbr -a -- - 'cd -'
abbr -a proj 'cd $PROJ' abbr -a proj 'cd $PROJ'
abbr -a mkd 'mkdir -pv' abbr -a mkd 'mkdir -pv'
@ -18,7 +18,7 @@ function abbrs --description 'All abbreviations'
abbr -a tnn 'tmux new-session -s noah' abbr -a tnn 'tmux new-session -s noah'
# Git # Git
abbr -a g 'git' abbr -a g git
abbr -a gs 'git status' abbr -a gs 'git status'
abbr -a gd 'git diff' abbr -a gd 'git diff'
abbr -a gds 'git diff --staged' abbr -a gds 'git diff --staged'
@ -30,7 +30,7 @@ function abbrs --description 'All abbreviations'
abbr -a gca 'git commit --amend' abbr -a gca 'git commit --amend'
abbr -a gu 'git pull' abbr -a gu 'git pull'
abbr -a gp 'git push' abbr -a gp 'git push'
abbr -a gpp 'git-push-upstream' abbr -a gpp git-push-upstream
abbr -a gl 'git log --graph --decorate --oneline -20' abbr -a gl 'git log --graph --decorate --oneline -20'
abbr -a gll 'git log --graph --decorate --oneline' abbr -a gll 'git log --graph --decorate --oneline'
abbr -a gco 'git checkout' abbr -a gco 'git checkout'
@ -55,35 +55,38 @@ function abbrs --description 'All abbreviations'
abbr -a ghm 'gh pr merge -s -d && git pull' abbr -a ghm 'gh pr merge -s -d && git pull'
# Vim # Vim
if command -v nvim > /dev/null if command -v nvim >/dev/null
alias --save vim='nvim' alias --save vim='nvim'
abbr -a vimrc 'vim $HOME/.config/nvim/init.lua' abbr -a vimrc 'vim $HOME/.config/nvim/init.lua'
else else
alias --save vim='vim' alias --save vim='vim'
abbr -a vimrc 'vim $HOME/.vimrc' abbr -a vimrc 'vim $HOME/.vimrc'
end end
abbr -a v 'vim' abbr -a v vim
abbr -a vl 'vim -c "normal! `0"' abbr -a vl 'vim -c "normal! `0"'
abbr -a vll 'vim -c "Telescope oldfiles"' abbr -a vll 'vim -c "Telescope oldfiles"'
abbr -a vh 'vim -c "Telescope oldfiles"' abbr -a vh 'vim -c "Telescope oldfiles"'
# Notes # Notes
abbr -a qn 'quicknote' abbr -a qn quicknote
abbr -a sn 'syncnotes' abbr -a sn syncnotes
abbr -a to 'today' abbr -a to today
abbr -a work 'vim $NOTES_PATH/work.md' abbr -a work 'vim $NOTES_PATH/work.md'
# RSS
abbr -a nb newsboat
# Improved CLI Tools # Improved CLI Tools
abbr -a cat 'bat' # Swap cat with bat abbr -a cat bat # Swap cat with bat
abbr -a h 'http -Fh --all' # Curl site for headers abbr -a h 'http -Fh --all' # Curl site for headers
abbr -a j 'just' abbr -a j just
# Fun CLI Tools # Fun CLI Tools
abbr weather 'curl wttr.in/$WEATHER_CITY' abbr weather 'curl wttr.in/$WEATHER_CITY'
abbr moon 'curl wttr.in/Moon' abbr moon 'curl wttr.in/Moon'
# Dotfile and config shortcuts # Dotfile and config shortcuts
abbr -a s 'sudo' abbr -a s sudo
abbr -a boot '$DOTS/scripts/bootstrap' abbr -a boot '$DOTS/scripts/bootstrap'
abbr -a sshc 'vim ~/.ssh/config' abbr -a sshc 'vim ~/.ssh/config'
abbr -a hosts 'sudo nvim /etc/hosts' abbr -a hosts 'sudo nvim /etc/hosts'
@ -92,7 +95,7 @@ function abbrs --description 'All abbreviations'
# Cheat Sheets # Cheat Sheets
abbr -a ssl 'openssl req -new -newkey rsa:2048 -nodes' \ abbr -a ssl 'openssl req -new -newkey rsa:2048 -nodes' \
'-keyout server.key -out server.csr' '-keyout server.key -out server.csr'
abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -' abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -'
abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub' abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub'
abbr -a forloop 'for i in (seq 1 100)' abbr -a forloop 'for i in (seq 1 100)'
@ -108,37 +111,37 @@ function abbrs --description 'All abbreviations'
abbr -a alp 'docker run --rm -it -v $PWD:/project alpine sh' abbr -a alp 'docker run --rm -it -v $PWD:/project alpine sh'
# Terraform # Terraform
abbr -a te 'terraform' abbr -a te terraform
abbr -a tap 'terraform apply' abbr -a tap 'terraform apply'
# Kubernetes # Kubernetes
abbr -a k 'kubectl' abbr -a k kubectl
abbr -a pods 'kubectl get pods -A' abbr -a pods 'kubectl get pods -A'
abbr -a nodes 'kubectl get nodes' abbr -a nodes 'kubectl get nodes'
abbr -a deploys 'kubectl get deployments -A' abbr -a deploys 'kubectl get deployments -A'
abbr -a dash 'kube-dashboard' abbr -a dash kube-dashboard
abbr -a ks 'k9s' abbr -a ks k9s
# Cloud # Cloud
abbr -a awsc 'vim ~/.aws/credentials' abbr -a awsc 'vim ~/.aws/credentials'
# Python # Python
abbr -a py 'python' abbr -a py python
abbr -a po 'poetry' abbr -a po poetry
abbr -a pr 'poetry run python' abbr -a pr 'poetry run python'
abbr -a pl 'poetry run pylint *' abbr -a pl 'poetry run pylint *'
abbr -a black 'poetry run black --target-version py38 .' abbr -a black 'poetry run black --target-version py38 .'
abbr -a bl 'poetry run black --target-version py38 .' abbr -a bl 'poetry run black --target-version py38 .'
# Rust # Rust
abbr -a ca 'cargo' abbr -a ca cargo
# macOS # macOS
abbr -a casks 'vim $DOTS/homebrew/Caskfile' abbr -a casks 'vim $DOTS/homebrew/Caskfile'
abbr -a t 'trash' abbr -a t trash
# Linux # Linux
if [ (uname) = "Linux" ] if [ (uname) = Linux ]
linux linux
end end