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 772629 - BASH Auto-Completion does not properly escape Parentheses
BASH Auto-Completion does not properly escape Parentheses
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
1.2.x
Other All
: Normal minor
: ---
Assigned To: Beniamino Galvani
NetworkManager maintainer(s)
Depends on:
Blocks: nm-review
 
 
Reported: 2016-10-08 22:50 UTC by Halo117Nachos
Modified: 2016-10-26 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] cli: completion: escape shell special characters "()&!" (1.57 KB, patch)
2016-10-17 13:13 UTC, Beniamino Galvani
none Details | Review

Description Halo117Nachos 2016-10-08 22:50:29 UTC
Hello, good people.

I have my NetworkManager set up to use a few OpenVPN providers, each of which has multiple servers. So, in naming these connections, I use something like this: "Provider (Server)" so I know exactly what I'm connecting to.

However, when I use BASH to type this: "nmcli con up id Privder[Tab button]", I get this: "Privider\ (". As you can see, the first parenthesis has not been properly escaped, which is really annoying. If I manually add a backslash before pressing the Tab button again, the backslash gets removed. This also happens when I use "nmcli con down blablabla".

I'm using the BASH completion script that came with my distro, Ubuntu 16.04 "Xenial Xerus".
Comment 1 Halo117Nachos 2016-10-08 23:00:14 UTC
BTW, I reported that the issue affects version 1.2.x, since that's what my distro comes with. However, in case the issue was fixed somehow, I decided to download the latest completion file from

"https://raw.githubusercontent.com/NetworkManager/NetworkManager/58349c3885fec0ab43bbcff025ffa04b9e9b7b4b/clients/cli/nmcli-completion"

and the issue was present there, too (I made sure to use a new shell to test it). So I guess this applies to git master as well.
Comment 2 Beniamino Galvani 2016-10-17 13:13:57 UTC
Created attachment 337850 [details] [review]
[PATCH] cli: completion: escape shell special characters "()&!"