aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Bezemer <maarten.bezemer@gmail.com>2012-02-12 12:29:28 +0100
committerJunichi Uekawa <dancer@netfort.gr.jp>2012-03-09 06:59:53 +0900
commit8ee2feeca1df91e0a5f1cdb8762ebb5da4f1aaa3 (patch)
tree572a0c057ebc4935a038e8febd77aafbcf0da9d4
parent929bd9bb85c3011a64e9764657c4e982b3035dc0 (diff)
downloadpbuilder-8ee2feeca1df91e0a5f1cdb8762ebb5da4f1aaa3.tar
pbuilder-8ee2feeca1df91e0a5f1cdb8762ebb5da4f1aaa3.tar.gz
Bug#659581: pbuilder: does not autocomplete filename in all cases correctly
Package: pbuilder Version: 0.204 Severity: normal Tags: patch User: ubuntu-devel@lists.ubuntu.com Usertags: origin-ubuntu precise ubuntu-patch When the pbuilder commands are used without starting with -- the auto completion of filenames does not work. Also, the filename auto completion does not take directories into account. *** /tmp/tmp_zb98I In Ubuntu, the attached patch was applied to achieve the following: * Auto complete filenames not working when not adding -- to the command (LP: #770529) * Add directories to filename auto completion Thanks for considering the patch. -- System Information: Debian Release: wheezy/sid APT prefers oneiric-security APT policy: (990, 'oneiric-security'), (900, 'oneiric-updates'), (500, 'oneiric'), (400, 'oneiric-proposed'), (100, 'oneiric-backports') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-15-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash === modified file 'bash_completion.d/pbuilder'
-rw-r--r--bash_completion.d/pbuilder6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash_completion.d/pbuilder b/bash_completion.d/pbuilder
index 1338411..9cf4571 100644
--- a/bash_completion.d/pbuilder
+++ b/bash_completion.d/pbuilder
@@ -14,14 +14,14 @@ _pbuilder()
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
- options='--create --update --build --login --execute --dumpconfig'
+ options='--create --update --build --login --execute --dumpconfig create update build login execute dumpconfig'
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
- elif [ "${COMP_WORDS[1]}" = --build ]; then
+ elif [ "${COMP_WORDS[1]}" = --build -o "${COMP_WORDS[1]}" = build ]; then
COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
fi
return 0
}
-[ "$have" ] && complete -F _pbuilder -o filenames pbuilder
+[ "$have" ] && complete -F _pbuilder -o filenames -o plusdirs pbuilder