[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-67-g3b93c22
Igor Murzov
e-mail at date.by
Tue Nov 6 15:05:42 UTC 2012
The following commit has been merged in the master branch:
commit 2472fad5de03ef91864926240a709b3f2b72a173
Author: Igor Murzov <e-mail at date.by>
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
More information about the Bash-completion-commits
mailing list