cfagent: Use _parse_help.

This commit is contained in:
Ville Skyttä 2011-05-20 20:44:37 +03:00
parent 25a74334e1
commit 08017ee3b2

View File

@ -2,17 +2,6 @@
have cfagent || return
_cfagent_options()
{
COMPREPLY=( $( compgen -W '--sysadm --force-net-copy --no-check-files \
--no-check-mounts --debug --define --no-edits --enforce-links --file \
--help --no-hard-classes --no-ifconfig --inform --no-copy --no-lock \
--traverse-links --delete-stale-links --no-mount --no-modules \
--dry-run --negate --parse-only --no-processes --no-splay \
--no-commands --silent --no-tidy --use-env --underscore-classes \
--verbose --version --no-preconf --no-links --quiet' -- "$cur" ) )
}
_cfagent()
{
local cur prev words cword
@ -26,7 +15,7 @@ _cfagent()
esac
if [[ "$cur" == -* ]]; then
_cfagent_options
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
fi
} &&
complete -F _cfagent cfagent
@ -69,7 +58,7 @@ _cfrun()
fi
;;
2)
_cfagent_options
COMPREPLY=( $( compgen -W '$( _parse_help cfagent )' -- "$cur" ) )
;;
esac
} &&