diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-20 17:54:36 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-20 17:55:39 +0200 |
| commit | ed1703497476eaf12e1d630caf4caa4aabc3acdc (patch) | |
| tree | 8553cc5979d28a9b1368b3cdae0c9a051452304f /completions | |
| parent | f0283e1c1b64202bb1adb9f44eac6fdfd80edece (diff) | |
| download | bash-completion-ed1703497476eaf12e1d630caf4caa4aabc3acdc.tar.gz | |
ccache: New completion.
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/Makefile.am | 1 | ||||
| -rw-r--r-- | completions/ccache | 26 |
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 |
