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 honors spaces in filenames.


================
Comment at: clang/utils/bash-autocomplete.sh:58
     # Disable it so that it works nicely for options in the form of -foo=bar.
-    [[ "${flags: -1}" == '=' ]] && compopt -o nospace
+    [[ "${flags: -1}" == '=' ]] && compopt -o nospace 2>/dev/null
     COMPREPLY=( $( compgen -W "$flags" -- "$cur" ) )
----------------
ruiu wrote:
> Is it okay to use compopt here? (I wonder how does this line work on macOS.)
I thought it will just emit errors and proceed to next line. This part doesn't 
make a big difference in completion, so I thought we can just ignore it when 
compopt is not supported.


https://reviews.llvm.org/D34924



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to