summaryrefslogtreecommitdiff
path: root/cli/completion/nmcli
Commit message (Collapse)AuthorAgeFilesLines
* cli/bash-completion: fix `nmcli connection CMD` completion for --help optionThomas Haller2014-03-021-10/+108
| | | | | | | The --help option (or its aliases -help/help) is only allowed at as first argument. Fix completion to account for this. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: only allow --help as first argument for nmcli ↵Thomas Haller2014-03-011-18/+47
| | | | | | connection modify Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: use printf instead of echo (because echo inteprets some ↵Thomas Haller2014-03-011-7/+4
| | | | | | --options) Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: simplify code by passing arrays by indirection to functionsThomas Haller2014-03-011-57/+76
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: complete more then one connections for `nmcli ↵Thomas Haller2014-02-281-1/+19
| | | | | | connection delete` Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: complete more then one properties for `nmcli connection ↵Thomas Haller2014-02-281-3/+11
| | | | | | modify` Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: complet nmcli connection modify --temporaryThomas Haller2014-02-281-1/+20
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: support abbreviated options for commandsThomas Haller2014-02-281-4/+12
| | | | | | | | Add support for abbreviated options as first argument: nmcli connection show --act <TAB> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: support abbreviations for optionsThomas Haller2014-02-281-40/+70
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: make 'ifname' a mandatory parameter for `nmcli ↵Thomas Haller2014-01-301-3/+27
| | | | | | | | | connection add` For some connection types (bond, bridge, team and vlan), 'ifname' is optional. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: complete 'save' option for `nmcli connection add`Thomas Haller2014-01-301-1/+2
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: update completion for new `nmcli connection show` syntaxThomas Haller2014-01-231-39/+40
| | | | | | | | As nmcli changes the syntax for the 'connection show' command, this patch for bash completion also breaks several cases when completing for an old nmcli command. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: trivial rename of functionsThomas Haller2014-01-101-45/+45
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: add second level help optionThomas Haller2014-01-101-15/+35
| | | | | | Commands now support help at the second level. Add completion for it. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: only complete active connections for `nmcli con down`Thomas Haller2014-01-101-2/+7
| | | | | | | Only complete the ids/uuids for active connections in `nmcli connection down <type> <TAB>`. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: cleanup/refactor by making functions genericThomas Haller2014-01-101-72/+28
| | | | | | | Instead of having several bash functions that return some values via nmcli, add few functions that accept parameters. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: fix wrong completion for `nmcli device wimax`Thomas Haller2014-01-101-18/+0
| | | | | | wimax does not support these arguments. This was a copy&paste error from wifi. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli/bash-completion: remove not yet implemented device type 'adsl'Thomas Haller2014-01-101-1/+1
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: add pppoe type to nmcli bash completionThomas Haller2013-12-181-1/+7
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: fix bash-completion for nmcli connection load (rh #1036545)Jiří Klimeš2013-12-171-1/+1
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1036545
* cli: bash completion completes filenames for team "config" propertyThomas Haller2013-11-221-1/+7
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: bash completion must not suggest IP options for adding slave typesThomas Haller2013-11-181-0/+3
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: add 'config' option to bash completion when adding team-slave connectionThomas Haller2013-11-181-1/+1
| | | | | | | Like 'team', 'team-slave' also understands the property 'config'. Add it to bash completion for the 'connection add' command. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: adjust bash completion for `nmcli connection load <file>...`Thomas Haller2013-11-151-0/+6
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: fix bash completion for curser not at EOL (2)Thomas Haller2013-11-131-1/+1
| | | | | | | Previous commit had an error in the following case: $ nmcli connection modify ' <TAB> id Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: fix bash completion for curser not at EOLThomas Haller2013-11-131-0/+7
| | | | | | | | | | | | | If the curser is not at the end of the line, we want to complete by ignoring everything right of the curser. However, the variable $cur is set to the spaces since the last word, so we have to get rid of them first Without this, the following did not complete: $ nmcli connection modify id <TAB> lo because $cur is set to ' '. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: add bash-completion for 'nmcli general hostname'Thomas Haller2013-11-131-1/+10
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1018510
* cli: improve handling of quoting in bash completionThomas Haller2013-11-121-0/+6
| | | | | | | | | | | | | _init_completion returns the '${words[@]}' array with all the quotes and escapes. We dont care about it so we drop (unescape) first. Before, the following failed: nmcli 'c' <TAB> nmcli connection modify id Wireless\ Connection\ 1 <TAB> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: improve bash completion to complete -h and --help aliasesThomas Haller2013-11-111-8/+15
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: add support for 'nmcli dev connect ifname XXX'Dan Williams2013-10-311-1/+2
|
* cli: add support for 'nmcli con up ifname XXX'Dan Williams2013-10-311-3/+16
| | | | | Passes a NULL connection to nm_client_activate_connection() allowing NetworkManager to pick the best available connection for the interface.
* cli: fix bash completion for `nmcli connection modify`Thomas Haller2013-10-301-1/+3
| | | | | | | | | | | | Only complete the setting name if it is at the very first position after the connection. e.g. complete the settings name in the case $ nmcli connection modify em1 connec<TAB> but not at $ nmcli connection modify em1 connection.autoconnect <TAB> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: show property names in bash completion for `nmcli connection modify`Thomas Haller2013-10-241-9/+10
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: fix bash completion to show general optionsThomas Haller2013-10-031-2/+2
| | | | | | | | | | This fixes an error in the following example: $ nmcli con add type bridge con-name test-bridge <TAB> Before, general options such as 'autoconnect' and 'ifname' were wrongly not suggested. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: add primary bonding option in bash completionThomas Haller2013-10-021-1/+2
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: fix missing type option 'team' in mcli completionThomas Haller2013-09-301-1/+1
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* nmcli: extend bash completion for 'nmcli networking connectivity'Thomas Haller2013-09-121-1/+7
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* nmcli: minor fixes in bash completionThomas Haller2013-09-061-2/+11
| | | | | | | - the ifname argument for "connection add" is not mandatory - support the long names for connection types ("802-*") Signed-off-by: Thomas Haller <thaller@redhat.com>
* nmcli: major rework of bash completionThomas Haller2013-09-051-180/+658
| | | | | | | | | | | | | | | | Bash completion does now parse the command line from left to right and only suggests options that make sense at the current cursor position. If the cursor is not at the end of the line, the words right from the cursor are ignored for completion. The reason is, that it would be much more difficult to figure out the valid options when also looking at options right from the cursor. However, it should still work nicely even in this case. There is still an unsolved issue when completing words with space or other special characters. However, this issue was present before. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: change completion to suggest connection idsThomas Haller2013-08-281-7/+12
| | | | | | | | | | Before, whereever a connection id is accepted, the completion only offered 'id', 'uuid', 'path', etc. With this change, it will additionally suggest the id of existing connections. https://bugzilla.redhat.com/show_bug.cgi?id=997997 Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: improve bash completion by parsing options separately.Thomas Haller2013-08-281-175/+254
| | | | | | | | | | | | | | To support optimal completion, more context must be considered. Especially the OPTIONS, which must appear before the OBJECT. Modify bash completion to try parsing first the options. Before, whenever you had options, completion did not work anymore (because the object was expected as first argument). Moreover, options were also suggested after specifying the object. This is now mitigated by parsing the command line in two steps. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: make bash-completion for nmcli support more abbreviations.Thomas Haller2013-08-131-128/+141
| | | | | | | | | Also sub commands can be abbreviated. Add some more aliases to the bash completion. Also fix the option 'nmcli radio mobile' which is called 'wwan'. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: make bash-completion support abbreviated object names.Thomas Haller2013-08-121-5/+5
| | | | | | | | nmcli accepts abbreviated versions of object names, e.g. 'con' instead of 'connection'. Adjust bash completion to also support this. Signed-off-by: Thomas Haller <thaller@redhat.com>
* cli: update bash-completion file for 'connection modify'Jiří Klimeš2013-07-221-1/+5
|
* cli: update bash-completion file for 'connection edit'Jiří Klimeš2013-07-221-1/+5
|
* cli: update bash completion file - 'nmcli connection reload'Jiří Klimeš2013-06-181-1/+1
|
* cli: change '--private' to 'private yes|no' in 'nmcli dev wifi connect'Jiří Klimeš2013-05-161-1/+1
| | | | Missing 'private' argument default to private=no, the same way as before.
* cli: update bash-completion file for 'connection add'Jiří Klimeš2013-05-071-22/+87
| | | | | | * _nmcli_list vs. _nmcli_list_nl - space vs. new-line separated list * connection add - various types, modes, mac, ifname, ...
* cli: update bash completion file for the new syntaxJiří Klimeš2013-04-091-53/+116
|
* Add bash-completion file for nmcliMichael Biebl2013-02-191-0/+197
Based on work by Guillaume Rousse <guillomovitch@gmail.com>