summaryrefslogtreecommitdiff
path: root/dev-vcs/git-annex/files/git-annex.bash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-vcs/git-annex/files/git-annex.bash
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-vcs/git-annex/files/git-annex.bash')
-rw-r--r--dev-vcs/git-annex/files/git-annex.bash19
1 files changed, 19 insertions, 0 deletions
diff --git a/dev-vcs/git-annex/files/git-annex.bash b/dev-vcs/git-annex/files/git-annex.bash
new file mode 100644
index 000000000000..309b221f0157
--- /dev/null
+++ b/dev-vcs/git-annex/files/git-annex.bash
@@ -0,0 +1,19 @@
+_git_annex()
+{
+ local cmdline
+ local IFS=$'
+'
+ CMDLINE=(--bash-completion-index $COMP_CWORD)
+
+ if [[ "${COMP_WORDS[@]:0:2}" == "git annex" ]]; then
+ unset COMP_WORDS[0]
+ COMP_WORDS[1]="git-annex"
+ fi
+ for arg in ${COMP_WORDS[@]}; do
+ CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg)
+ done
+
+ COMPREPLY=( $(/usr/bin/git-annex "${CMDLINE[@]}") )
+}
+
+complete -o filenames -F _git_annex git-annex