Fix zsh hanging when tab completing add/checkout
This commit is contained in:
parent
abf6ea4b61
commit
beb83077d8
1 changed files with 13 additions and 0 deletions
|
@ -7,6 +7,19 @@ zstyle -T ':completion:*:yadm:argument-1:descriptions:' format && \
|
|||
zstyle -T ':completion:*:yadm:*:yadm' group-name && \
|
||||
zstyle ':completion:*:yadm:*:yadm' group-name ''
|
||||
|
||||
function _yadm-add(){
|
||||
yadm_path="$(yadm rev-parse --show-toplevel)"
|
||||
yadm_options=$(yadm status --porcelain=v1 |
|
||||
awk -v yadm_path=${yadm_path} '{printf "%s/\"%s\"\\:\"%s\" ", yadm_path, $2, $1 }' )
|
||||
_alternative \
|
||||
"args:custom arg:(($yadm_options))" \
|
||||
'files:filename:_files'
|
||||
}
|
||||
|
||||
function _yadm-checkout(){
|
||||
_yadm-add
|
||||
}
|
||||
|
||||
_yadm-alt() {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue