diff options
Diffstat (limited to 'etc/completions/_git-hook')
-rw-r--r-- | etc/completions/_git-hook | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/etc/completions/_git-hook b/etc/completions/_git-hook deleted file mode 100644 index cdf15a7..0000000 --- a/etc/completions/_git-hook +++ /dev/null @@ -1,31 +0,0 @@ -#compdef git-hook -## Completion for the git-hook function, see ../functions/git-hook -## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org> -## License: WTFPL <http://sam.zoy.org/wtfpl> - -typeset hook_dir expl - -if [[ -n $GIT_DIR && -d $GIT_DIR ]] { - hook_dir=$GIT_DIR/hooks -} elif [[ -d .git/hooks ]] { - hook_dir=$PWD/.git/hooks -} elif [[ -d hooks ]] { - hook_dir=$PWD/hooks -} elif [[ $PWD == */hooks ]] { - hook_dir=$PWD -} else { - hook_dir=$(git rev-parse --git-dir)/hooks -} - -if (( CURRENT == 2 )) { - _wanted ation expl 'action' \ - compadd list enable disable -} elif (( CURRENT == 3 )) { - if [[ ${words[2]} == 'enable' ]] { - _wanted hook expl 'git hook' \ - _path_files -W $hook_dir -g '*(^x)' - } elif [[ ${words[2]} == 'disable' ]] { - _wanted hook expl 'git hook' \ - _path_files -W $hook_dir -g '*(x)' - } -} |