Created
May 13, 2017 07:52
-
-
Save yamaguchi1024/03edc473db97051fde4cc05825ee0ff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bash_completion b/bash_completion | |
old mode 100644 | |
new mode 100755 | |
diff --git a/completions/Makefile.am b/completions/Makefile.am | |
index eb2cf16..406f00b 100644 | |
--- a/completions/Makefile.am | |
+++ b/completions/Makefile.am | |
@@ -66,6 +66,7 @@ bashcomp_DATA = 2to3 \ | |
cppcheck \ | |
crontab \ | |
cryptsetup \ | |
+ clang \ | |
curl \ | |
cvs \ | |
cvsps \ | |
diff --git a/completions/clang b/completions/clang | |
new file mode 100644 | |
index 0000000..08ba438 | |
--- /dev/null | |
+++ b/completions/clang | |
@@ -0,0 +1,14 @@ | |
+# clang(1) completion | |
+ | |
+_clang() | |
+{ | |
+ local cur prev words cword | |
+ _init_completion -n : || return | |
+ | |
+ flags=$(/home/yamaguchi/test-build/bin/clang-5.0 -autocomplete="$cur") | |
+ COMPREPLY=( $( compgen -W "$flags" -- "$cur")) | |
+ | |
+} && | |
+ complete -F _clang clang | |
+ | |
+# ex: filetype=sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment