diff options
Diffstat (limited to 'bash_completion')
-rw-r--r-- | bash_completion | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/bash_completion b/bash_completion index 0918598..852ab2d 100644 --- a/bash_completion +++ b/bash_completion @@ -86,9 +86,9 @@ fi _quilt_comfile() { COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -f -- "$cur" ) ) - echo $( compgen -d -- "$cur" ) | while read d ; do - COMPREPLY=( ${COMPREPLY[@]:-} "$d/" ) - done + echo $( compgen -d -- "$cur" ) | while read d ; do + COMPREPLY=( ${COMPREPLY[@]:-} "$d/" ) + done } _quilt_completion() @@ -99,9 +99,9 @@ _quilt_completion() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - # quilt sub commands + # quilt sub commands cmds='add annotate applied delete diff edit files fold fork graph \ - grep header import mail new next patches pop previous push refresh \ + grep header import mail new next patches pop previous push refresh \ remove rename revert series setup snapshot top unapplied' # if no command were given, complete on commands @@ -109,14 +109,14 @@ _quilt_completion() COMPREPLY=( $( compgen -W "$cmds -h" -- $cur ) ) return 0 fi - - # if we're completing for 'quilt -h', then just + + # if we're completing for 'quilt -h', then just # complete on any valid command if [ ${COMP_WORDS[1]} == -h ] ; then COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) - return 0 + return 0 fi - + # Accept a partial command if it's unique, because quilt will accept it. command_matches=( $(compgen -W "$cmds" -- ${COMP_WORDS[1]}) ) if [ ${#command_matches[@]} -ne 1 ] ; then @@ -128,45 +128,45 @@ _quilt_completion() add) case $prev in -P) - COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) + COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) - ;; + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) + ;; esac ;; annotate) case $prev in -P) - COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) + COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) - ;; + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) + ;; esac ;; - applied) + applied) COMPREPLY=( $( compgen -W "-h $(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) ;; - delete) + delete) COMPREPLY=( $( compgen -W "-n -r -h --backup $(quilt --quiltrc - series)" -- $cur ) ) ;; - diff) + diff) case $prev in -p) - COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) + COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) ;; -P|--combine) - COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) + COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) ;; --diff|-U|-C) ;; *) - _filedir - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p -P -u -U -c -C -R -z -h --snapshot --diff --no-timestamps --no-index --combine --sort" -- $cur ) ) - ;; + _filedir + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p -P -u -U -c -C -R -z -h --snapshot --diff --no-timestamps --no-index --combine --sort" -- $cur ) ) + ;; esac ;; edit) @@ -186,21 +186,21 @@ _quilt_completion() fold) case $prev in -p) - COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) + COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p" -- $cur ) ) - ;; + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p" -- $cur ) ) + ;; esac ;; graph) case $prev in -T) - COMPREPLY=( $( compgen -W "ps" -- $cur ) ) + COMPREPLY=( $( compgen -W "ps" -- $cur ) ) ;; --edge-labels) - COMPREPLY=( $( compgen -W "files" -- $cur ) ) + COMPREPLY=( $( compgen -W "files" -- $cur ) ) ;; *) COMPREPLY=( $( compgen -W "-T -h --all --reduce --lines --edge-labels $(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) @@ -217,7 +217,7 @@ _quilt_completion() import) case $prev in -p) - COMPREPLY=( $( compgen -W "0 1 2 3 4 5 6 7 8 9 10" -- $cur ) ) + COMPREPLY=( $( compgen -W "0 1 2 3 4 5 6 7 8 9 10" -- $cur ) ) ;; -P) ;; @@ -225,9 +225,9 @@ _quilt_completion() COMPREPLY=( $( compgen -W "o a n" -- $cur ) ) ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p -P -f -d -h" -- $cur ) ) - ;; + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-p -P -f -d -h" -- $cur ) ) + ;; esac ;; mail) @@ -237,7 +237,7 @@ _quilt_completion() COMPREPLY=( $( compgen -W "$(quilt --quiltrc - series)" -- $cur ) ) ;; patches) - _quilt_comfile + _quilt_comfile COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-v -h" -- $cur ) ) ;; pop) @@ -249,23 +249,23 @@ _quilt_completion() refresh) case $prev in -p) - COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) + COMPREPLY=( $( compgen -W "0 1" -- $cur ) ) ;; -U|-C) ;; *) - COMPREPLY=( $( compgen -W "-p -u -U -c -C -f -h $(quilt --quiltrc - applied 2>/dev/null) --no-timestamps --no-index --diffstat --sort --backup --strip-trailing-whitespace" -- $cur ) ) + COMPREPLY=( $( compgen -W "-p -u -U -c -C -f -h $(quilt --quiltrc - applied 2>/dev/null) --no-timestamps --no-index --diffstat --sort --backup --strip-trailing-whitespace" -- $cur ) ) ;; esac ;; remove|revert) case $prev in -P) - COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) + COMPREPLY=( $( compgen -W "$(quilt --quiltrc - applied 2>/dev/null)" -- $cur ) ) ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-P -h" -- $cur ) ) ;; esac ;; @@ -285,11 +285,11 @@ _quilt_completion() setup) case $prev in -d) - _filedir -d + _filedir -d ;; *) - _quilt_comfile - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-d -v -h" -- $cur ) ) + _quilt_comfile + COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "-d -v -h" -- $cur ) ) ;; esac ;; |