Skip to content
Snippets Groups Projects
Commit c5b8fc49 authored by Richard Hartmann's avatar Richard Hartmann Committed by GitHub
Browse files

Merge pull request #225 from danielshahaf/complete-files-for-git-add-v1

completion: Pass GIT_DIR to _git.
parents e7699ab3 b99d2691
Branches
No related tags found
No related merge requests found
...@@ -95,6 +95,9 @@ function _vcsh () { ...@@ -95,6 +95,9 @@ function _vcsh () {
local state vcshcommand local state vcshcommand
local -a args subcommands local -a args subcommands
local VCSH_REPO_D
: ${VCSH_REPO_D:="${XDG_CONFIG_HOME:-"$HOME/.config"}/vcsh/repo.d"}
subcommands=( subcommands=(
"clone:clone an existing repository" "clone:clone an existing repository"
"commit:commit in all repositories" "commit:commit in all repositories"
...@@ -135,7 +138,7 @@ function _vcsh () { ...@@ -135,7 +138,7 @@ function _vcsh () {
if ! (( ${+functions[_vcsh-$vcshcommand]} )); then if ! (( ${+functions[_vcsh-$vcshcommand]} )); then
# There is no handler function, so this is probably the name # There is no handler function, so this is probably the name
# of a repository. Act accordingly. # of a repository. Act accordingly.
_dispatch git git GIT_DIR=$VCSH_REPO_D/$words[1].git _dispatch git git
else else
curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:" curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:"
_call_function ret _vcsh-${vcshcommand} _call_function ret _vcsh-${vcshcommand}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment