1
0
Fork 0
mirror of synced 2024-11-04 09:08:56 -05:00

Fix duplicates from completion

This commit is contained in:
Joshua Cold 2022-05-07 12:41:00 -06:00 committed by Tim Byrne
parent beb83077d8
commit 7573e18a89
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

View file

@ -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(){