Home | History | Annotate | Download | only in clang
      1 # Please add "source /path/to/bash-autocomplete.sh" to your .bashrc to use this.
      2 _clang()
      3 {
      4   local cur prev words cword flags
      5   _init_completion -n : || return
      6 
      7   flags=$( clang --autocomplete="$cur" )
      8   if [[ "$flags" == "" || "$cur" == "" ]]; then
      9     _filedir
     10   else
     11     COMPREPLY=( $( compgen -W "$flags" -- "$cur" ) )
     12   fi
     13 }
     14 complete -F _clang clang
     15