Bug 1271271

Summary: incorrect completion of bluetooth device in nmcli
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Rashid Khan <rkhan>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: bgalvani, dcbw, lrintel, rkhan, thaller
Target Milestone: beta   
Target Release: 7.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 19:17:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1301628, 1313485    

Description Vladimir Benes 2015-10-13 13:56:50 UTC
Description of problem:

pressing tab after nmcli device connect give me escaped : but that's incorrect

[vbenes@trautenberg ~]$ nmcli device 
DEVICE             TYPE      STATE         CONNECTION            
virbr0             bridge    connected     virbr0                
enp0s25            ethernet  connected     Ethernet connection 1 
virbr0-nic         tap       connected     virbr0-nic            
78:40:E4:F0:0E:BF  bt        disconnected  --                    
wlp3s0             wifi      unavailable   --                    
lo                 loopback  unmanaged     --     

[vbenes@trautenberg ~]$ nmcli device connect (pressing Tab)
78\\:40\\:E4\\:F0\\:0E\\:BF  help                         virbr0                       wlp3s0                       
enp0s25                      lo                           virbr0-nic                   

then after autocompletion when 78 and tab entered I get:

[vbenes@trautenberg ~]$ nmcli device connect 78\\:40\\:E4\\:F0\\:0E\\:BF 
Error: Device '78\:40\:E4\:F0\:0E\:BF' not found.

[vbenes@trautenberg ~]$ nmcli device connect 78:40:E4:F0:0E:BF
Device '78:40:E4:F0:0E:BF' successfully activated with 'b7702d5b-e05b-40cf-bc7e-0a6f1d536b77'.

Version-Release number of selected component (if applicable):
NetworkManager-1.0.6-17.el7.x86_64

Comment 3 Lubomir Rintel 2015-10-19 15:25:02 UTC
The fix looks good to me.

Comment 4 Thomas Haller 2015-10-20 08:04:14 UTC
(In reply to Jirka Klimes from comment #1)
> Pushed a fix to jk/nmcli-bash-completion-rh1271271 branch.

LGTM.

Please also reference upstream bug https://bugzilla.gnome.org/show_bug.cgi?id=745157 and close it.

Comment 5 Thomas Haller 2015-10-20 08:06:44 UTC
(In reply to Thomas Haller from comment #4)
> (In reply to Jirka Klimes from comment #1)
> > Pushed a fix to jk/nmcli-bash-completion-rh1271271 branch.
> 
> LGTM.
> 
> Please also reference upstream bug
> https://bugzilla.gnome.org/show_bug.cgi?id=745157 and close it.

and see commit http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=81c420dc6251f54c3358411093bcc902166fdb7a

which has:

  "FIXME: currently the completion considers colon as separator"

Comment 6 Jirka Klimes 2015-10-20 10:23:08 UTC
Committed upstream:
master: 91dde2c nmcli: fix bash completion of words containing colon (rh #1271271)
nm-1-0: ca599fa nmcli: fix bash completion of words containing colon (rh #1271271)

Unfortunately it does not fix all problems with colons, so I am leaving https://bugzilla.gnome.org/show_bug.cgi?id=745157 open for now.

Comment 11 errata-xmlrpc 2016-11-03 19:17:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2581.html