From: Richard Hartmann Date: Sun, 27 Aug 2017 19:26:13 +0000 (+0200) Subject: Merge pull request #227 from danielshahaf/completion-set-context-foreach-dispatch-v1 X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/3c5bb9b0993011e30695dae011daa7b861847f11?hp=c5b8fc495769611d635614599762346e0f444fb9 Merge pull request #227 from danielshahaf/completion-set-context-foreach-dispatch-v1 completion: Set the context correctly in 'foreach'. --- diff --git a/_vcsh b/_vcsh index bc1a7b9..6880f72 100644 --- a/_vcsh +++ b/_vcsh @@ -24,7 +24,7 @@ function _vcsh-enter () { } function _vcsh-foreach () { - _dispatch git git + _dispatch vcsh-foreach git } function _vcsh-help () { @@ -138,6 +138,7 @@ function _vcsh () { if ! (( ${+functions[_vcsh-$vcshcommand]} )); then # There is no handler function, so this is probably the name # of a repository. Act accordingly. + # FIXME: this may want to use '_dispatch vcsh git' GIT_DIR=$VCSH_REPO_D/$words[1].git _dispatch git git else curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:"