The following commit has been merged in the master branch:
commit 2472fad5de03ef91864926240a709b3f2b72a173
Author: Igor Murzov <[email protected]>
Date: Tue Nov 6 16:36:52 2012 +0400
_command_offset: Restore compopts properly (Alioth: #313890)
This commit is basicaly a more robust version of 5051b1787a, which made
invalid assumptions about a completion specification.
diff --git a/bash_completion b/bash_completion
index ff60be8..7152d5e 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1700,16 +1700,13 @@ _command_offset()
fi
# restore initial compopts
- local opt t
- while true; do
+ local opt
+ while [[ $cspec == *" -o "* ]]; do
# FIXME: should we take "+o opt" into account?
- t=${cspec#*-o }
- if [[ $t == $cspec ]]; then
- break
- fi
- opt=${t%% *}
+ cspec=${cspec#*-o }
+ opt=${cspec%% *}
compopt -o $opt
- cspec=${t#$opt}
+ cspec=${cspec#$opt}
done
else
cspec=${cspec#complete}
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-commits