Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
b99d2691
Commit
b99d2691
authored
7 years ago
by
Daniel Shahaf
Browse files
Options
Downloads
Patches
Plain Diff
completion: Pass GIT_DIR to _git.
This enables file completion at «vcsh foo add <TAB>».
parent
36a7cedf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_vcsh
+4
-1
4 additions, 1 deletion
_vcsh
with
4 additions
and
1 deletion
_vcsh
+
4
−
1
View file @
b99d2691
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment