Improve tab completion
This commit is contained in:
parent
ce23cf89b9
commit
30c9f2ab4f
1 changed files with 7 additions and 4 deletions
|
|
@ -21,12 +21,15 @@ case ${COMP_CWORD} in
|
||||||
commands=$(list_branches)
|
commands=$(list_branches)
|
||||||
COMPREPLY=( $(compgen -W "${commands}" "$2") )
|
COMPREPLY=( $(compgen -W "${commands}" "$2") )
|
||||||
;;
|
;;
|
||||||
stage | unstage | ignore)
|
stage | unstage | ignore | rm)
|
||||||
COMPREPLY=( $(compgen -A file -X .git "$2") )
|
compopt -o nospace
|
||||||
;;
|
COMPREPLY=( $(compgen -o default -S "/" -d -X .git "$2") )
|
||||||
|
;;
|
||||||
diff)
|
diff)
|
||||||
|
compopt -o nospace
|
||||||
commands="STAGE"
|
commands="STAGE"
|
||||||
COMPREPLY=( $(compgen -A file -X .git -W "${commands}" "$2") )
|
COMPREPLY=( $(compgen -W "${commands}" "$2") )
|
||||||
|
COMPREPLY+=( $(compgen -o default -S "/" -d -X .git "$2") )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue