[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly
Yuka Takahashi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 9 06:20:15 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL307478: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly (authored by yamaguchi).
Changed prior to commit:
https://reviews.llvm.org/D34927?vs=105208&id=105771#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34927
Files:
cfe/trunk/utils/bash-autocomplete.sh
Index: cfe/trunk/utils/bash-autocomplete.sh
===================================================================
--- cfe/trunk/utils/bash-autocomplete.sh
+++ cfe/trunk/utils/bash-autocomplete.sh
@@ -34,12 +34,18 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34927.105771.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170709/f6f399c4/attachment.bin>
More information about the cfe-commits
mailing list