cli: fix bash completion for curser not at EOL (2)

Previous commit had an error in the following case:
  $ nmcli connection modify  '  <TAB>     id

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2013-11-13 14:38:13 +01:00
parent 93f5687d7b
commit bbddc0e18a

View file

@ -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 <TAB> lo`
if [[ "$cur" =~ [[:space:]]+ ]]; then
if [[ "$cur" =~ ^[[:space:]]+ ]]; then
cur=''
fi