From: Richard Hartmann Date: Sun, 27 Aug 2017 19:23:01 +0000 (+0200) Subject: Merge branch 'master' into completion-set-context-foreach-dispatch-v1 X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/d3ff85c0d7594234d13a5256adaa2d77d7a7a4d6?ds=inline;hp=-c Merge branch 'master' into completion-set-context-foreach-dispatch-v1 --- d3ff85c0d7594234d13a5256adaa2d77d7a7a4d6 diff --combined _vcsh index 96ae612,bc1a7b9..6880f72 --- a/_vcsh +++ b/_vcsh @@@ -24,7 -24,7 +24,7 @@@ function _vcsh-enter () } function _vcsh-foreach () { - _dispatch git git + _dispatch vcsh-foreach git } function _vcsh-help () { @@@ -95,6 -95,9 +95,9 @@@ function _vcsh () local state vcshcommand local -a args subcommands + local VCSH_REPO_D + : ${VCSH_REPO_D:="${XDG_CONFIG_HOME:-"$HOME/.config"}/vcsh/repo.d"} + subcommands=( "clone:clone an existing repository" "commit:commit in all repositories" @@@ -135,8 -138,7 +138,8 @@@ 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' - _dispatch git git + GIT_DIR=$VCSH_REPO_D/$words[1].git _dispatch git git else curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:" _call_function ret _vcsh-${vcshcommand}