zsh-workers
 help / color / mirror / code / Atom feed
* nmcli completions
@ 2015-06-08 20:44 Chad Sharp
  2015-06-08 21:10 ` Eric Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Chad Sharp @ 2015-06-08 20:44 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

I'm not a subscriber to the mailing list and please forgive me if this 
is the wrong place to report this.

The completions for nmcli are very incomplete and in some instances, 
incorrect.

These were my steps
$ zsh -f
$ autoload -U compinit
$ compinit -i
$ nmcli <Tab>
   con -- NetworkManager connections
   dev -- devices managed by NetworkManager
   nm -- NetworkManager status
$ nmcli con <Tab>
  down -- deactivate a connection
  list -- list configured connections
  status -- print status of active connections
  up -- activate a connection
$ nmcli dev <Tab>
  disconnect -- disconnect device and prevent it from automatically 
activating
  list -- get detailed information about devices
  status -- print status of devices
  wifi -- list available wifi access points

For simplicity's sake, I'm only going one subcommand deep because if you 
try to tab complete "nmcli con mod" (which should have a large amount of 
options you can change in the network configuration) you only get the 
"con, dev and nm" completions again.

So to starting from the top, `nmcli nm` is not a command and should not 
be part of the completion at all. nmcli con and nmcli dev are valid 
commands but there are several others that should be included. nmcli's 
options of course, but also the remaining objects: gen, net, rad, and 
age. All the objects should also have completions as well.

`nmcli con help` does show down, list, status and up but also show, add, 
modify, edit, delete, reload and load. Some of these objects have 
further subobjects or options themselves.

`nmcli dev help` does have disconnect, list, status and wifi but also 
status and connect. As before, wifi has several subobjects and options

[-- Attachment #2: Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: nmcli completions
  2015-06-08 20:44 nmcli completions Chad Sharp
@ 2015-06-08 21:10 ` Eric Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Cook @ 2015-06-08 21:10 UTC (permalink / raw)
  To: zsh-workers

On 06/08/2015 04:44 PM, Chad Sharp wrote:
> I'm not a subscriber to the mailing list and please forgive me if this 
> is the wrong place to report this.
> 
> The completions for nmcli are very incomplete and in some instances, 
> incorrect.
> 

It happens when the command in question changes, but the completion function lags behind.
The function itself haven't changed since it's initial commit back in 2011, when network manager was at release 0.8


> So to starting from the top, `nmcli nm` is not a command and should not 
> be part of the completion at all. 

It used to be:
> NMCLI(1)                                                              NMCLI(1)
>
>
>
>NAME
>       nmcli - command-line tool for controlling NetworkManager
>
>SYNOPSIS
>       nmcli  [ OPTIONS ] OBJECT { COMMAND | help }
>
>
>       OBJECT := { nm | con | dev }
>
>
>       OPTIONS := {
...

It just needs someone interested in updating it.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-08 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-08 20:44 nmcli completions Chad Sharp
2015-06-08 21:10 ` Eric Cook

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).