[Bash-completion-commits] ./current r1145: added code to gracefully handle debug options (set +/-v)

David Paleino d.paleino at gmail.com
Mon Jun 23 10:03:06 UTC 2008


------------------------------------------------------------
revno: 1145
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Mon 2008-06-23 12:03:06 +0200
message:
  added code to gracefully handle debug options (set +/-v)
modified:
  bash_completion
  debian/changelog
-------------- next part --------------
=== modified file 'bash_completion'
--- a/bash_completion	2008-06-23 10:00:22 +0000
+++ b/bash_completion	2008-06-23 10:03:06 +0000
@@ -25,7 +25,17 @@
 #
 #   RELEASE: 20080617.2
 
-[ -n "${BASH_COMPLETION_DEBUG:-}" ] && set -v || set +v
+if [[ $- == *v* ]]; then
+	BASH_COMPLETION_ORIGINAL_V_VALUE="-v"
+else
+	BASH_COMPLETION_ORIGINAL_V_VALUE="+v"
+fi
+
+if [[ -n $BASH_COMPLETION_DEBUG ]]; then
+	set -v
+else
+	set +v
+fi
 
 # Alter the following to reflect the location of this file.
 #
@@ -9435,6 +9445,9 @@
 unset UNAME RELEASE default dirnames filenames have nospace bashdefault \
       plusdirs
 
+set $BASH_COMPLETION_ORIGINAL_V_VALUE
+unset BASH_COMPLETION_ORIGINAL_V_VALUE
+
 ###  Local Variables:
 ###  mode: shell-script
 ###  End:

=== modified file 'debian/changelog'
--- a/debian/changelog	2008-06-23 10:00:22 +0000
+++ b/debian/changelog	2008-06-23 10:03:06 +0000
@@ -17,8 +17,9 @@
     - added flv/FLV completion to mplayer
     - only complete on filenames for aspell
     - fixed code for exclusions compspecs
+    - added code to gracefully handle debug options (set +/-v)
 
- -- David Paleino <d.paleino at gmail.com>  Mon, 23 Jun 2008 12:00:07 +0200
+ -- David Paleino <d.paleino at gmail.com>  Mon, 23 Jun 2008 12:02:40 +0200
 
 bash-completion (20080617.3) unstable; urgency=low
 



More information about the Bash-completion-commits mailing list