From 03fed6bbca029b3d7c1c2954afdb997f22f24313 Mon Sep 17 00:00:00 2001 From: Lukasz Pawelczyk Date: Tue, 9 Jun 2015 15:18:29 +0200 Subject: [PATCH] Fix bash completion in case of user grep color aliases [Bug] Mitigate user grep aliases that use colors [Cause] N/A [Solution] Add --color=never to grep [Verification] Checked that bash completion works Change-Id: Ifffaf2e931f1cd573c6629a1932aca28b924509a --- cli/support/vasum-cli-completion.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/support/vasum-cli-completion.sh.in b/cli/support/vasum-cli-completion.sh.in index 79a5dad..18dda54 100755 --- a/cli/support/vasum-cli-completion.sh.in +++ b/cli/support/vasum-cli-completion.sh.in @@ -6,7 +6,7 @@ __@PROJECT_NAME@_cli() { COMPREPLY=() if [ "$COMP_CWORD" == "1" ]; then - COMPREPLY=($(compgen -W "$(@CLI_CODENAME@ | grep -e '^\S' | tail -n +3 | cut -f1 -d' ')" -- $cur)) + COMPREPLY=($(compgen -W "$(@CLI_CODENAME@ | grep --color=never -e '^\S' | tail -n +3 | cut -f1 -d' ')" -- $cur)) elif [ "$COMP_CWORD" == "2" ]; then COMPREPLY=($(compgen -W "-h" -- $cur)) fi -- 2.7.4