diff --git a/fish.configlink/functions/abbrs.fish b/fish.configlink/functions/abbrs.fish index 1bc52fb..1e17c01 100644 --- a/fish.configlink/functions/abbrs.fish +++ b/fish.configlink/functions/abbrs.fish @@ -3,11 +3,11 @@ function abbrs --description 'All abbreviations' # Directory aliases - abbr -a l 'ls' + abbr -a l ls abbr -a lh 'ls -lh' abbr -a ll 'ls -alhF' abbr -a lf 'ls -lh | fzf' - abbr -a c 'cd' + abbr -a c cd abbr -a -- - 'cd -' abbr -a proj 'cd $PROJ' abbr -a mkd 'mkdir -pv' @@ -18,7 +18,7 @@ function abbrs --description 'All abbreviations' abbr -a tnn 'tmux new-session -s noah' # Git - abbr -a g 'git' + abbr -a g git abbr -a gs 'git status' abbr -a gd 'git diff' abbr -a gds 'git diff --staged' @@ -30,7 +30,7 @@ function abbrs --description 'All abbreviations' abbr -a gca 'git commit --amend' abbr -a gu 'git pull' 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 gll 'git log --graph --decorate --oneline' abbr -a gco 'git checkout' @@ -55,35 +55,38 @@ function abbrs --description 'All abbreviations' abbr -a ghm 'gh pr merge -s -d && git pull' # Vim - if command -v nvim > /dev/null + if command -v nvim >/dev/null alias --save vim='nvim' abbr -a vimrc 'vim $HOME/.config/nvim/init.lua' else alias --save vim='vim' abbr -a vimrc 'vim $HOME/.vimrc' end - abbr -a v 'vim' + abbr -a v vim abbr -a vl 'vim -c "normal! `0"' abbr -a vll 'vim -c "Telescope oldfiles"' abbr -a vh 'vim -c "Telescope oldfiles"' # Notes - abbr -a qn 'quicknote' - abbr -a sn 'syncnotes' - abbr -a to 'today' + abbr -a qn quicknote + abbr -a sn syncnotes + abbr -a to today abbr -a work 'vim $NOTES_PATH/work.md' + # RSS + abbr -a nb newsboat + # 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 j 'just' + abbr -a j just # Fun CLI Tools abbr weather 'curl wttr.in/$WEATHER_CITY' abbr moon 'curl wttr.in/Moon' # Dotfile and config shortcuts - abbr -a s 'sudo' + abbr -a s sudo abbr -a boot '$DOTS/scripts/bootstrap' abbr -a sshc 'vim ~/.ssh/config' abbr -a hosts 'sudo nvim /etc/hosts' @@ -92,7 +95,7 @@ function abbrs --description 'All abbreviations' # Cheat Sheets 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 publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub' 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' # Terraform - abbr -a te 'terraform' + abbr -a te terraform abbr -a tap 'terraform apply' # Kubernetes - abbr -a k 'kubectl' + abbr -a k kubectl abbr -a pods 'kubectl get pods -A' abbr -a nodes 'kubectl get nodes' abbr -a deploys 'kubectl get deployments -A' - abbr -a dash 'kube-dashboard' - abbr -a ks 'k9s' + abbr -a dash kube-dashboard + abbr -a ks k9s # Cloud abbr -a awsc 'vim ~/.aws/credentials' # Python - abbr -a py 'python' - abbr -a po 'poetry' + abbr -a py python + abbr -a po poetry abbr -a pr 'poetry run python' abbr -a pl 'poetry run pylint *' abbr -a black 'poetry run black --target-version py38 .' abbr -a bl 'poetry run black --target-version py38 .' # Rust - abbr -a ca 'cargo' + abbr -a ca cargo # macOS abbr -a casks 'vim $DOTS/homebrew/Caskfile' - abbr -a t 'trash' + abbr -a t trash # Linux - if [ (uname) = "Linux" ] + if [ (uname) = Linux ] linux end