Skip to content

Commit

Permalink
Merge pull request #417 from joshzcold/master
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLocehiliosan committed Jun 22, 2022
2 parents 6a49e84 + 799c32c commit dfa1228
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions completion/zsh/_yadm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ zstyle -T ':completion:*:yadm:argument-1:descriptions:' format && \
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\n", yadm_path, $2, $1}' ))

_describe 'command' yadm_options
_files
}

function _yadm-checkout(){
_yadm-add
}

_yadm-alt() {
return 0
}
Expand Down

0 comments on commit dfa1228

Please sign in to comment.