benlangmuir closed this revision.
benlangmuir added a comment.
r333202
https://reviews.llvm.org/D47273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yamaguchi accepted this revision.
yamaguchi added a comment.
LGTM
https://reviews.llvm.org/D47273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D47273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
benlangmuir updated this revision to Diff 148278.
benlangmuir edited the summary of this revision.
benlangmuir added a comment.
Thanks for looking up the supported bash version! Updated diff.
https://reviews.llvm.org/D47273
Files:
utils/bash-autocomplete.sh
Index: utils/bash-autocomplete.
ruiu added a comment.
(I found that information at
http://wiki.bash-hackers.org/scripting/bashchanges#quoting_expansions_substitutions_and_related)
Repository:
rC Clang
https://reviews.llvm.org/D47273
___
cfe-commits mailing list
cfe-commits@lis
ruiu added a comment.
Looks like $'' is there since bash 2.0 which should be pretty safe to use in
the script. So feel free to use $'' instead of $(echo ...) in this patch.
Repository:
rC Clang
https://reviews.llvm.org/D47273
___
cfe-commits mai
ruiu added a comment.
Oh, I didn't know the existence of $''. Thank you for the suggestion! I wonder
which version of bash started supporting that notation. Do you know if all
recent versions of bash support it? Unfortunately `$'' bash` is very hard query
to google...
Repository:
rC Clang
benlangmuir added a comment.
In https://reviews.llvm.org/D47273#1109985, @ruiu wrote:
> sed -e "$(echo -e 's/\t.*//')"
Yep, that works! Is there a reason you prefer that over the more succinct
`$'s/\t.*//'`?
Repository:
rC Clang
https://reviews.llvm.org/D47273
__
ruiu added a comment.
How about
sed -e "$(echo -e 's/\t.*//')"
?
Repository:
rC Clang
https://reviews.llvm.org/D47273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benlangmuir added a comment.
In https://reviews.llvm.org/D47273#1109934, @ruiu wrote:
> I wonder if you could replace \t with \0x09. At least it works on my machine
> which has GNU sed.
Unfortunately that doesn't work either on mac :-\
Repository:
rC Clang
https://reviews.llvm.org/D47273
ruiu added a comment.
Even though Perl may be installed to 99.99% of machines that use this
autocomplete script, using perl instead of sed is too much. If we could use
perl, we'd have wrote this script entirely in perl in the first place. We
shouldn't add a dependency to perl.
I wonder if you
benlangmuir created this revision.
benlangmuir added reviewers: yamaguchi, v.g.vassilev, ruiu, teemperor.
Herald added a subscriber: cfe-commits.
We have a regex that needs to match a tab character in the command output, but
on macOS `sed` doesn't support '\t', causing it to split on the 't' char
12 matches
Mail list logo