Use _split_longopt in _chkconfig.
This commit is contained in:
parent
b556b22d87
commit
78f2e7cd91
4
CHANGES
4
CHANGES
@ -34,8 +34,8 @@ bash-completion (1.x)
|
||||
input in external command arguments.
|
||||
* Add _split_longopt() helper for improved handling of long options that
|
||||
take arguments in both "--foo bar" and "--foo=bar" formats.
|
||||
* Use _split_longopt to improve and clean up aspell, chgrp, chown, and
|
||||
generic long option completion.
|
||||
* Use _split_longopt to improve and clean up aspell, chgrp, chown, chkconfig,
|
||||
and generic long option completion.
|
||||
* Add chown --from and --reference value completions.
|
||||
* Add chgrp --reference value completion.
|
||||
* Do not assume all --foo= options take filenames in generic long option
|
||||
|
@ -2636,14 +2636,16 @@ complete -F _chsh chsh
|
||||
have chkconfig &&
|
||||
_chkconfig()
|
||||
{
|
||||
local cur prev
|
||||
local cur prev split=false
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
_split_longopt && split=true
|
||||
|
||||
case "$prev" in
|
||||
@([1-6]|--@(list|add|del)))
|
||||
@(?(--level=)[1-6]|--@(list|add|del|override)))
|
||||
_services
|
||||
return 0
|
||||
;;
|
||||
@ -2653,6 +2655,8 @@ _chkconfig()
|
||||
;;
|
||||
esac
|
||||
|
||||
$split && return 0
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--list --add --del --override \
|
||||
--level' -- $cur ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user