ovs-command-completion: Fix unwanted whitespace.
authorAlex Wang <alexw@nicira.com>
Sun, 14 Dec 2014 05:40:25 +0000 (21:40 -0800)
committerAlex Wang <alexw@nicira.com>
Sun, 14 Dec 2014 05:47:35 +0000 (21:47 -0800)
This commit fixes unwanted whitespace in the ovs
bash completion script output.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
utilities/ovs-command-compgen.bash

index c87445a..a515c1d 100755 (executable)
@@ -371,7 +371,7 @@ kwords_to_args() {
                 match=
                 ;;
         esac
                 match=
                 ;;
         esac
-        match=$(echo "$match" | tr '\n' ' ' | sed -e 's/^[ \t]*//')
+        match=$(echo "$match" | tr '\n' ' ' | tr -s ' ' | sed -e 's/^[ \t]*//')
         args+=( $match )
         if [ -n "$_PRINTF_ENABLE" ]; then
             local output_stderr=
         args+=( $match )
         if [ -n "$_PRINTF_ENABLE" ]; then
             local output_stderr=