diff options
author | Jean Delvare <jdelvare@suse.de> | 2016-10-21 14:58:30 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2016-10-21 14:58:30 +0200 |
commit | 78b86cb1aedef51e2aac33a796150bedc3245772 (patch) | |
tree | 0267d0dcbca3f0b3edbfecd515472b4640e2b9dc /bash_completion | |
parent | 45b7694ea0f1aa11376def696610849ea53fb629 (diff) | |
download | quilt-78b86cb1aedef51e2aac33a796150bedc3245772.tar.gz |
bash_completion: Delete dead code
You can't change the caller's environment from the right hand side of
a pipe. So that code was doing nothing, which means we can just
delete it.
What the code was supposedly doing, is actually implemented by
complete's option "filenames". So move the comment to where this
option is set, to clear the confusion.
Diffstat (limited to 'bash_completion')
-rw-r--r-- | bash_completion | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bash_completion b/bash_completion index b6a04ae..562594f 100644 --- a/bash_completion +++ b/bash_completion @@ -80,15 +80,9 @@ fi # Complete on files, not on directories # -# Directories are shown in completion, but with their trailing / so that -# user can go in them. It ought to be a more standard way to achieve this. -# _quilt_comfile() { COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -f -- "$cur" ) ) - compgen -d -- "$cur" | while read d ; do - COMPREPLY=( ${COMPREPLY[@]:-} "$d/" ) - done } _quilt_completion() @@ -305,6 +299,9 @@ _quilt_completion() return 0 } +# With option "filenames", directories are shown in completion with their +# trailing / so that the user can go in them. +# [ ${BASH_VERSINFO[0]} '>' 2 -o \ ${BASH_VERSINFO[0]} = 2 -a ${BASH_VERSINFO[1]} '>' 04 ] \ && _quilt_complete_opt="-o filenames" |