From 30c9f2ab4fca268bbb15cda27b0499a6a3a537aa Mon Sep 17 00:00:00 2001 From: William Hilton Date: Tue, 3 Nov 2015 00:08:33 -0500 Subject: [PATCH] Improve tab completion --- bash_completion | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bash_completion b/bash_completion index 48e52bb..77da286 100644 --- a/bash_completion +++ b/bash_completion @@ -21,12 +21,15 @@ case ${COMP_CWORD} in commands=$(list_branches) COMPREPLY=( $(compgen -W "${commands}" "$2") ) ;; - stage | unstage | ignore) - COMPREPLY=( $(compgen -A file -X .git "$2") ) - ;; + stage | unstage | ignore | rm) + compopt -o nospace + COMPREPLY=( $(compgen -o default -S "/" -d -X .git "$2") ) + ;; diff) + compopt -o nospace 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 ;;