From 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Tue, 20 Dec 2016 20:06:37 +0800 Subject: Imported Upstream version 1.4.4 --- clients/cli/nmcli-completion | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'clients/cli/nmcli-completion') diff --git a/clients/cli/nmcli-completion b/clients/cli/nmcli-completion index e78ab85c..e1716f60 100644 --- a/clients/cli/nmcli-completion +++ b/clients/cli/nmcli-completion @@ -25,10 +25,11 @@ _nmcli_list_nl() # [']bla'bla"bla\bla bla --> [']bla'\''bla"bla\bla bla COMPREPLY[$i]="${entry//\'/${escaped_single_quote}}" elif [[ "${cur:0:1}" == '"' ]]; then - # started with double quote, escaping all double quotes and all backslashes + # started with double quote, escaping all double quotes, backslashes and ! # ["]bla'bla"bla\bla bla --> ["]bla'bla\"bla\\bla bla entry="${entry//\\/\\\\}" entry="${entry//\"/\\\"}" + entry="${entry//!/\"\\!\"}" COMPREPLY[$i]="$entry" else # no quotes in front, escaping _everything_ @@ -37,6 +38,10 @@ _nmcli_list_nl() entry="${entry//\'/\'}" entry="${entry//\"/\\\"}" entry="${entry// /\\ }" + entry="${entry//\(/\\(}" + entry="${entry//)/\\)}" + entry="${entry//!/\\!}" + entry="${entry//&/\\&}" COMPREPLY[$i]="$entry" fi (( i++ )) -- cgit 1.3.0-6-gf8a5