Fix duplicates from completion
This commit is contained in:
parent
beb83077d8
commit
7573e18a89
1 changed files with 6 additions and 5 deletions
|
@ -8,12 +8,13 @@ zstyle -T ':completion:*:yadm:*:yadm' group-name && \
|
|||
zstyle ':completion:*:yadm:*:yadm' group-name ''
|
||||
|
||||
function _yadm-add(){
|
||||
local -a yadm_options yadm_path
|
||||
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'
|
||||
yadm_options=($(yadm status --porcelain=v1 |
|
||||
awk -v yadm_path=${yadm_path} '{printf "%s/%s ", yadm_path, $2}' ))
|
||||
|
||||
_describe 'command' yadm_options
|
||||
_files
|
||||
}
|
||||
|
||||
function _yadm-checkout(){
|
||||
|
|
Loading…
Reference in a new issue