[PATCH] D34925: [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME
Yuka Takahashi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 1 09:30:46 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL306957: [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME (authored by yamaguchi).
Changed prior to commit:
https://reviews.llvm.org/D34925?vs=104991&id=104997#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34925
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
@@ -24,7 +24,9 @@
arg="$w2=,$cur"
fi
- flags=$( "${COMP_WORDS[0]}" --autocomplete="$arg" 2>/dev/null )
+ # expand ~ to $HOME
+ eval local path=${COMP_WORDS[0]}
+ flags=$( "$path" --autocomplete="$arg" 2>/dev/null )
# If clang is old that it does not support --autocomplete,
# fall back to the filename completion.
if [[ "$?" != 0 ]]; then
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34925.104997.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170701/3104c531/attachment.bin>
More information about the cfe-commits
mailing list