[devscripts] 01/01: adjusted dscextract bash completion to guard against old format
Nicholas Bamber
periapt at moszumanska.debian.org
Tue Dec 1 13:53:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
periapt pushed a commit to branch master
in repository devscripts.
commit 70c80aa73cca63dd27bea796b5cb97b0d6212481
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date: Tue Dec 1 13:53:38 2015 +0000
adjusted dscextract bash completion to guard against old format
---
scripts/dscextract.bash_completion | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/dscextract.bash_completion b/scripts/dscextract.bash_completion
index ce439bf..80cdc40 100644
--- a/scripts/dscextract.bash_completion
+++ b/scripts/dscextract.bash_completion
@@ -11,8 +11,12 @@ _dscextract()
declare -a _compreply=( $( compgen -o filenames -G '*.dsc' ) )
COMPREPLY=( $( compgen -W "${_compreply[*]}" -- "$cur" ) )
elif [[ "$prev" == *.dsc ]]; then
- declare -a _compreply=( $( tar tvf ${prev/.dsc/.debian.tar.*} | sed 's! \+! !g' | cut -d' ' -f6 ) )
- COMPREPLY=( $( compgen -W "${_compreply[*]}" -- "$cur" ) )
+ if [[ -f ${prev/.dsc/.debian.tar.*} ]]; then
+ declare -a _compreply=( $( tar tvf ${prev/.dsc/.debian.tar.*} | sed 's! \+! !g' | cut -d' ' -f6 ) )
+ COMPREPLY=( $( compgen -W "${_compreply[*]}" -- "$cur" ) )
+ else
+ COMPREPLY=()
+ fi
else
declare -a _compreply=( $( compgen -W '-f' -o filenames -G '*.dsc' ) )
COMPREPLY=( $( compgen -W "${_compreply[*]}" -- "$cur" ) )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list