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
+  if [[ "$?" != 0 ]]; then
+    COMPREPLY=( $( compgen -f) )
+  fi
----------------
Let's be consistent on spacing. Please add a space after `-f`.


================
Comment at: clang/utils/bash-autocomplete.sh:15
+  # Require bash-completion with _init_completion
+  _init_completion -n 2>/dev/null
+  if [[ "$?" != 0 ]]; then
----------------
Likewise, add a space after `2>`.


================
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" ) )
----------------
Is it okay to use compopt here? (I wonder how does this line work on macOS.)


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