diff options
author | Freddy Vulto <fvulto@gmail.com> | 2010-01-29 23:23:30 +0100 |
---|---|---|
committer | Freddy Vulto <fvulto@gmail.com> | 2010-01-29 23:23:30 +0100 |
commit | d866854066fb3b6711cf6fc92ff648a0a12ee9d8 (patch) | |
tree | 45fdbfa5885c37c47dedd6d7453a82bc81bf3297 /contrib | |
parent | dc8af65161fecc37d2d2ab15c02d8f529d27c3b5 (diff) | |
download | bash-completion-d866854066fb3b6711cf6fc92ff648a0a12ee9d8.tar.gz |
Fix _usergroup, cpio and chown completions
Improve test suite.
Thanks to Leonard Crestez (Alioth: #311396, Debian: #511788).
`assert_complete' is improved. It proved difficult to tell tcl to ignore
backslash escapes, e.g. the `\b' is no BACKSPACE but a literal `b'. The added
function `split_words_bash' should to the trick now.
Added function `assert_no_complete' which can also be reached by calling
`assert_complete' with an empty `expected' argument:
assert_complete "" qwerty
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cpio | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/cpio b/contrib/cpio index e8e4a5a5..dddfc190 100644 --- a/contrib/cpio +++ b/contrib/cpio @@ -11,8 +11,8 @@ _cpio() local cur prev split=false COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} + cur=`_get_cword :` + prev=`_get_pword :` _split_longopt && split=true @@ -91,7 +91,7 @@ _cpio() esac fi } -complete -F _cpio cpio +complete -F _cpio -o filenames cpio } # Local variables: |