blob: a906712514758c5c12fd862d61e61cb2c8c7ccb1 [file] [log] [blame]
Yuka Takahashic8068db2017-05-23 18:39:08 +00001# 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}
14complete -F _clang clang