1
0
Fork 0

zsh: Add completion for git-fetch-branch

This commit is contained in:
Jeremy Kaplan 2024-09-26 15:55:42 -04:00
commit 6ded061a99
2 changed files with 10 additions and 0 deletions

View file

@ -17,6 +17,8 @@ zstyle ':completion:*' _expand completer _complete _ignored
zstyle ':completion:*' matcher-list '' 'l:|=* r:|=*' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**' zstyle ':completion:*' matcher-list '' 'l:|=* r:|=*' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**'
zstyle :compinstall filename "$HOME/.zshrc" zstyle :compinstall filename "$HOME/.zshrc"
fpath=("$HOME/.config/zsh/completions" $fpath)
autoload -Uz compinit autoload -Uz compinit
compinit compinit

View file

@ -0,0 +1,8 @@
#compdef git-fetch-branch
#description fetch a branch by name
_git-fetch-branch() {
__git_branch_names "$@"
}
_git-fetch-branch "$@"