diff options
author | Brad King <brad.king@kitware.com> | 2013-09-23 18:30:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-15 14:46:54 (GMT) |
commit | b601e2350afa89e592c4a601b08f8c74728d1ae3 (patch) | |
tree | 24db537acd620a356e1daf25d9e2d050d50f382d /Auxiliary/bash-completion/cpack | |
parent | 07b80021aad97a4f4243e97576bae4670114a3ca (diff) | |
download | CMake-b601e2350afa89e592c4a601b08f8c74728d1ae3.zip CMake-b601e2350afa89e592c4a601b08f8c74728d1ae3.tar.gz CMake-b601e2350afa89e592c4a601b08f8c74728d1ae3.tar.bz2 |
Rename Docs to Auxiliary
The directory contains auxiliary support files for integration with
other tools, not documentation.
Diffstat (limited to 'Auxiliary/bash-completion/cpack')
-rw-r--r-- | Auxiliary/bash-completion/cpack | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Auxiliary/bash-completion/cpack b/Auxiliary/bash-completion/cpack new file mode 100644 index 0000000..9ab6048 --- /dev/null +++ b/Auxiliary/bash-completion/cpack @@ -0,0 +1,61 @@ +# bash completion for cpack(1) -*- shell-script -*- + +_cpack() +{ + local cur prev words cword + _init_completion -n = || return + + case "$prev" in + -G) + COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null | + sed -e "1,/^Generators/d" -e "s|^ *\([^ ]*\) .*$|\1|" \ + 2>/dev/null )' -- "$cur" ) ) + return + ;; + -C) + COMPREPLY=( $( compgen -W 'Debug Release RelWithDebInfo + MinSizeRel' -- "$cur" ) ) + return + ;; + -D) + [[ $cur == *=* ]] && return # no completion for values + COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ + 2>/dev/null | grep -v "^cpack version " )' -S = -- "$cur" ) ) + compopt -o nospace + return + ;; + -P|-R|--vendor) + # argument required but no completions available + return + ;; + -B) + _filedir -d + return + ;; + --config) + _filedir + return + ;; + --help-command) + COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null| + grep -v "^cpack version " )' -- "$cur" ) ) + return + ;; + --help-variable) + COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ + 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) ) + return + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $(compgen -W '$( _parse_help "$1" --help )' -- ${cur}) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + [[ $COMPREPLY ]] && return + fi + + _filedir +} && +complete -F _cpack cpack + +# ex: ts=4 sw=4 et filetype=sh |