f733e71e1f
- Added code comments to _get_cword, __get_cword3 & __get_cword4 - (testsuite) Added tests for _get_cword - (testsuite) Bugfixes assert_bash_exec() && match_items() Bash-4 splits COMP_WORDS using characters from COMP_WORDBREAKS, but has a bug where quoted words are also splitted, see: http://www.mail-archive.com/bug-bash@gnu.org/msg06095.html __get_cword3 is used for bash-2/3 and __get_cword4 is used for bash-4. __get_cword4 handles well temporarily disabling of COMP_WORDBREAK characters, but fails quoted words (a 'b c) and subshells (a $(b c). See the expected failures when running the automated tests. __get_cword3 does a better job of returning quoted words. To run the automated tests on bash-3/4: $ ./runUnit _get_cword.exp [--tool_exec <path to bash-3/4 binary>]