summaryrefslogtreecommitdiffstats
path: root/clang/utils/bash-autocomplete.sh
diff options
context:
space:
mode:
Diffstat (limited to 'clang/utils/bash-autocomplete.sh')
-rw-r--r--clang/utils/bash-autocomplete.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/utils/bash-autocomplete.sh b/clang/utils/bash-autocomplete.sh
index c28dc86b130..bab193c56b1 100644
--- a/clang/utils/bash-autocomplete.sh
+++ b/clang/utils/bash-autocomplete.sh
@@ -34,12 +34,18 @@ _clang()
elif [[ "$w1" == -* && "$cur" == '=' ]]; then
# -foo=<tab>
arg="$w1=,"
+ elif [[ "$cur" == -*= ]]; then
+ # -foo=<tab>
+ arg="$cur,"
elif [[ "$w1" == -* ]]; then
# -foo <tab> or -foo bar<tab>
arg="$w1,$cur"
elif [[ "$w2" == -* && "$w1" == '=' ]]; then
# -foo=bar<tab>
arg="$w2=,$cur"
+ elif [[ ${cur: -1} != '=' && ${cur/=} != $cur ]]; then
+ # -foo=bar<tab>
+ arg="${cur%=*}=,${cur#*=}"
fi
# expand ~ to $HOME
OpenPOWER on IntegriCloud