nmcli-completion: fix support for embedded quote characters

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/455

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1325

Fixes: 9d2290135c ('cli: make nmcli do its own command completion')
This commit is contained in:
avery 2022-08-03 18:31:01 -07:00 committed by Thomas Haller
parent 3ce3451040
commit ebdf3bd376
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -84,7 +84,7 @@ _nmcli()
# no quotes in front, escaping _everything_
# [ ]bla'bla"bla\bla bla --> [ ]bla\'bla\"bla\\bla\ bla
entry="${entry//\\/\\\\}"
entry="${entry//\'/\'}"
entry="${entry//\'/\\\'}"
entry="${entry//\"/\\\"}"
entry="${entry// /\\ }"
entry="${entry//\(/\\(}"