From bbddc0e18a8023127f85da23106e04cffcd2ea18 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Nov 2013 14:38:13 +0100 Subject: [PATCH] cli: fix bash completion for curser not at EOL (2) Previous commit had an error in the following case: $ nmcli connection modify ' id Signed-off-by: Thomas Haller --- cli/completion/nmcli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/completion/nmcli b/cli/completion/nmcli index 7f535bccf6..6088318498 100644 --- a/cli/completion/nmcli +++ b/cli/completion/nmcli @@ -547,7 +547,7 @@ _nmcli() # In case the cursor is not at the end of the line, # $cur consists of spaces that we want do remove. # For example: `nmcli connection modify id lo` - if [[ "$cur" =~ [[:space:]]+ ]]; then + if [[ "$cur" =~ ^[[:space:]]+ ]]; then cur='' fi