This revision was automatically updated to reflect the committed changes.
Closed by commit rL306962: [Bash-autocompletion] Add support for older bash
version. (authored by yamaguchi).
Changed prior to commit:
https://reviews.llvm.org/D34924?vs=104996&id=104999#toc
Repository:
rL LLVM
https:
teemperor accepted this revision.
teemperor added a comment.
LGTM, everything still works in the latest bash on Linux.
Also thanks for the reviews Rui!
https://reviews.llvm.org/D34924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://l
ruiu accepted this revision.
ruiu added a comment.
LGTM. Confirmed that it works as expected on my Mac which doesn't have the
bash-autocomplete package.
Comment at: clang/utils/bash-autocomplete.sh:19
+COMPREPLY=()
+cword=$COMP_CWORD
+cur="${COMP_WORDS[$cword]}"
--
yamaguchi updated this revision to Diff 104996.
yamaguchi added a comment.
_get_comp_words_by_ref still depends on older bash-completion package, so
delete this and set cword and cur manualy.
https://reviews.llvm.org/D34924
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-au
v.g.vassilev accepted this revision.
v.g.vassilev added a comment.
It looks like this works with bash 3.2. I've tested this on mac and it works
well.
https://reviews.llvm.org/D34924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lis
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D34924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
yamaguchi updated this revision to Diff 104994.
yamaguchi marked an inline comment as done.
yamaguchi added a comment.
Update patch.
https://reviews.llvm.org/D34924
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-autocomplete.sh
==
ruiu added inline comments.
Comment at: clang/utils/bash-autocomplete.sh:8-9
+ # the latter doesn't. So we use compgen only when _filedir is not provided.
+ _filedir 2>/dev/null
+ [[ "$?" != 0 ]] && COMPREPLY=( $( compgen -f ) )
+}
If this works, you can proba
yamaguchi updated this revision to Diff 104993.
yamaguchi added a comment.
Update diff.
https://reviews.llvm.org/D34924
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-autocomplete.sh
===
--- clang/utils/bash-au
ruiu added inline comments.
Comment at: clang/utils/bash-autocomplete.sh:3
+
+_clang_filedir()
+{
yamaguchi wrote:
> ruiu wrote:
> > Is the output of `compgen -f` the same as `_filedir`? If so, can you always
> > use `compgen -f`?
> _filedir is better than `comp
yamaguchi updated this revision to Diff 104992.
yamaguchi marked 2 inline comments as done.
yamaguchi added a comment.
Update diff.
https://reviews.llvm.org/D34924
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-autocomplete.sh
===
yamaguchi added inline comments.
Comment at: clang/utils/bash-autocomplete.sh:3
+
+_clang_filedir()
+{
ruiu wrote:
> Is the output of `compgen -f` the same as `_filedir`? If so, can you always
> use `compgen -f`?
_filedir is better than `compgen -f`, because it
ruiu added inline comments.
Comment at: clang/utils/bash-autocomplete.sh:3
+
+_clang_filedir()
+{
Is the output of `compgen -f` the same as `_filedir`? If so, can you always use
`compgen -f`?
Comment at: clang/utils/bash-autocomplete.sh:7
+ i
13 matches
Mail list logo