summaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-11-20 17:54:36 +0200
committerVille Skyttä <ville.skytta@iki.fi>2011-11-20 17:55:39 +0200
commited1703497476eaf12e1d630caf4caa4aabc3acdc (patch)
tree8553cc5979d28a9b1368b3cdae0c9a051452304f /completions
parentf0283e1c1b64202bb1adb9f44eac6fdfd80edece (diff)
downloadbash-completion-ed1703497476eaf12e1d630caf4caa4aabc3acdc.tar.gz
ccache: New completion.
Diffstat (limited to 'completions')
-rw-r--r--completions/Makefile.am1
-rw-r--r--completions/ccache26
2 files changed, 27 insertions, 0 deletions
diff --git a/completions/Makefile.am b/completions/Makefile.am
index e2137edc..e67f9d11 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -28,6 +28,7 @@ bashcomp_DATA = a2x \
cal \
cancel \
cardctl \
+ ccache \
cfagent \
cfrun \
chage \
diff --git a/completions/ccache b/completions/ccache
new file mode 100644
index 00000000..63f5a1c6
--- /dev/null
+++ b/completions/ccache
@@ -0,0 +1,26 @@
+# ccache(1) completion -*- shell-script -*-
+
+_ccache()
+{
+ local cur prev words cword split
+ _init_completion -s || return
+
+ if [[ $COMP_CWORD -eq 1 && ${COMP_WORDS[COMP_CWORD]} != -* ]]; then
+ _command_offset 1
+ return
+ fi
+
+ case $prev in
+ -h|--help|-V|--version|-F|--max-files|-M|--max-size)
+ return
+ ;;
+ esac
+
+ $split && return
+
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
+} &&
+complete -F _ccache ccache
+
+# ex: ts=4 sw=4 et filetype=sh