X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/2cc7ffcd61352b55d7c010c7524a739b3fe13c80..b99d26914007cd902b92c5fe0524a233d778a724:/_vcsh diff --git a/_vcsh b/_vcsh index 6562dc5..bc1a7b9 100644 --- a/_vcsh +++ b/_vcsh @@ -40,10 +40,6 @@ function _vcsh-list () { } function _vcsh-list-tracked () { - _nothing -} - -function _vcsh-list-tracked-by () { (( CURRENT == 2 )) && __vcsh_repositories } @@ -99,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" @@ -109,7 +108,6 @@ function _vcsh () { "init:initialize an empty repository" "list:list all local vcsh repositories" "list-tracked:list all files tracked by vcsh" - "list-tracked-by:list files tracked by a repository" "list-untracked:list all files not tracked by vcsh" "pull:pull from all vcsh remotes" "push:push to vcsh remotes" @@ -140,7 +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. - _dispatch git git + GIT_DIR=$VCSH_REPO_D/$words[1].git _dispatch git git else curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:" _call_function ret _vcsh-${vcshcommand}