diff --git a/.gitconfig b/.gitconfig index 21621e7..5af73a6 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,7 +11,6 @@ autoSquash = true [alias] publish = !git pull && git push - cb = !git-tmp-switch.sh [push] default = current autoSetupRemote = true diff --git a/.local/bin/git-tmp-switch.sh b/.local/bin/git-cb similarity index 100% rename from .local/bin/git-tmp-switch.sh rename to .local/bin/git-cb diff --git a/.zfunc/_git-cb b/.zfunc/_git-cb new file mode 100644 index 0000000..79dab7f --- /dev/null +++ b/.zfunc/_git-cb @@ -0,0 +1,6 @@ +#compdef git-cb + +_git-cb() { + _arguments \ + '1:branch:__git_branch_names' +} diff --git a/.zshrc b/.zshrc index 71e2358..f0723b4 100644 --- a/.zshrc +++ b/.zshrc @@ -52,3 +52,4 @@ bindkey -s ^f "tmux-sessionizer\n" source ~/.aliases fpath+=~/.zfunc autoload -U compinit; compinit -d +compdef _git git-cb