After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745157 - nmcli: fix bash completion to treat colon ':' as a normal character instead of a separator
nmcli: fix bash completion to treat colon ':' as a normal character instead o...
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: nmcli
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-25 13:27 UTC by Jiri Klimes
Modified: 2020-11-12 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] WIP: cli/completion: add completion for --order option (3.68 KB, patch)
2015-02-25 13:32 UTC, Jiri Klimes
none Details | Review

Description Jiri Klimes 2015-02-25 13:27:30 UTC
Bug 738613 has added '--order' option to 'nmcli connection show' command. Let's implement bash completion for the option.
Comment 1 Thomas Haller 2015-02-25 13:31:28 UTC
see https://bugzilla.gnome.org/show_bug.cgi?id=738613#c6 for a first attempt of a patch
Comment 2 Jiri Klimes 2015-02-25 13:32:19 UTC
Created attachment 297869 [details] [review]
[PATCH] WIP: cli/completion: add completion for --order option

Attaching Thomas Haller's WIP patch from https://bugzilla.gnome.org/show_bug.cgi?id=738613#c6
Comment 3 Thomas Haller 2015-02-25 13:34:58 UTC
btw, this is a bit more grave then just a missing completion.

The command line syntax for order uses colons, which confuses the current implementation of nmcli-completion, because bash completion interprets colon as a separator for words -- so it's not completely trivial to fix...
Comment 4 Jiri Klimes 2015-02-25 13:50:55 UTC
(In reply to Thomas Haller from comment #3)
> btw, this is a bit more grave then just a missing completion.
> 
> The command line syntax for order uses colons, which confuses the current
> implementation of nmcli-completion, because bash completion interprets colon
> as a separator for words -- so it's not completely trivial to fix...

Would it help if we changed the separator to ',' instead of ':'?
Comment 5 Thomas Haller 2015-02-25 13:55:45 UTC
(In reply to Jiri Klimes from comment #4)
> (In reply to Thomas Haller from comment #3)
> > btw, this is a bit more grave then just a missing completion.
> > 
> > The command line syntax for order uses colons, which confuses the current
> > implementation of nmcli-completion, because bash completion interprets colon
> > as a separator for words -- so it's not completely trivial to fix...
> 
> Would it help if we changed the separator to ',' instead of ':'?

yes, then the implementation for nmcli-completion would be simple.

but, ':' arguably looks better then ','.

also, nmcli completion already has a problem with colons. We should fix that anyway and then the colons are fine.

e.g.

  # suppose you have a connection name "Wired Connection 1"
  nmcli connection show foo:Wir<TAB>
Comment 6 Thomas Haller 2015-03-02 13:08:17 UTC
I merged parts of attachment 297869 [details] [review] as http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=81c420dc6251f54c3358411093bcc902166fdb7a

Now, completion for --order is implemented, but it breaks down if there are colons.


The problem with colons is not specific to --order. I update the subject of the bug to reflect that.
Comment 7 Thomas Haller 2016-01-15 17:18:31 UTC
Commit http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=91dde2c improves on the situation. But it's not always correct.
Comment 8 André Klapper 2020-11-12 14:28:22 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).