NetworkManager/clients/cli
Francesco Giudici 6a3d77fbe6 nmcli: allow cmd specific option parsing in next_arg() func
Options dependant on specific commands (e.g., nmcli connection show
--active) are now allowed to be processed by the next_arg() function.
This would allow autocompletion to expand options belonging to specific
command first, and then global ones.

Note that global options ("--ask" and "--show-secrets") will be auto-completed
everywhere but only if at least a '-' is passed. Command specific ones
(--temporary, --active, --order) will be auto-completed only after the command
they belongs to but without requiring the user to pass a heading '-'.

Example:
'nmcli connection show -a'
will expand '-a' into '--active', but
'nmcli connection add -a`
will expand '-a' into '--ask' (as it is a global option)

This commit fixes also autocompletion for:
nmcli connection modify --temporary
2017-04-05 15:43:40 +02:00
..
agent.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
common.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
common.h cli: don't track output data in global NmCli structure 2017-03-30 14:56:21 +02:00
connections.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
connections.h cli: add -f argument completion 2016-08-01 15:51:29 +02:00
devices.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
devices.h cli: add -f argument completion 2016-08-01 15:51:29 +02:00
general.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
general.h cli: output a short summary of devices when called without arguments 2016-07-19 14:29:05 +02:00
nmcli-completion cli: make nmcli do its own command completion 2017-02-13 16:32:15 +01:00
nmcli.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
nmcli.h cli: don't track output data in global NmCli structure 2017-03-30 14:56:21 +02:00
polkit-agent.c all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
polkit-agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
settings.c cli: embed gtk-doc directly in property-info structure 2017-03-30 16:35:52 +02:00
settings.h cli: split nm-meta-setting-desc out of settings 2017-03-30 13:09:58 +02:00
utils.c nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00
utils.h nmcli: allow cmd specific option parsing in next_arg() func 2017-04-05 15:43:40 +02:00