zsh: add zsh-abbr

This commit is contained in:
Daniel Lundin 2023-07-02 16:34:21 +02:00
parent 8050aa5304
commit f8d1cf1a57
3 changed files with 17 additions and 0 deletions

6
.config/zsh-abbr/abbr-jj Normal file
View file

@ -0,0 +1,6 @@
abbr add -S --force "c"="jj commit"
abbr add -S --force "new"="jj new main"
abbr add -S --force "p"="jj git push"
abbr add -S --force "s"="jj status"
abbr add -S --force "sl"="jj log --ignore-working-copy"
abbr add -S --force "d"="jj show"

View file

@ -0,0 +1,9 @@
abbr "abbr-jj"="source ~/.config/zsh-abbr/abbr-jj"
abbr "c"="git commit"
abbr "d"="git diff --stat -p -C --color-words"
abbr "g"="git"
abbr "k"="kubectl"
abbr "new"="git checkout --detach main"
abbr "p"="git push"
abbr "s"="git status"
abbr "sl"="git sl"

2
.zshrc
View file

@ -19,6 +19,8 @@ zi load zsh-users/zsh-history-substring-search
zi ice wait lucid
zi load nix-community/nix-zsh-completions
zi ice wait lucid
zi load olets/zsh-abbr
zi ice wait lucid
zi snippet https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/shrink-path/shrink-path.plugin.zsh
zstyle ':completion:*' use-cache on