[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.
Rui Ueyama via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 1 05:58:11 PDT 2017
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 probably make it shorter
_filedir 2> /dev/null || COMPREPLY=...
https://reviews.llvm.org/D34924
More information about the cfe-commits
mailing list