X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/1a4ff3158b1034b51d102e7253115d514325c430..f7f3bce02a604ca96fe5c239ba351a501a08568d:/_vcsh diff --git a/_vcsh b/_vcsh index 96ae612..1661e19 100644 --- a/_vcsh +++ b/_vcsh @@ -95,6 +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" @@ -136,10 +139,10 @@ function _vcsh () { # 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} + _call_function ret _vcsh-${vcshcommand} && (( ret )) fi fi fi