diff options
author | Alexey Neyman <stilor@att.net> | 2018-04-04 07:07:45 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-04-07 19:03:17 (GMT) |
commit | 970811a1c58d22fad37d8cbe2233b8344f358e78 (patch) | |
tree | 414e1095de2ae795d543556e14e384f5567fce7e /ct-ng.comp | |
parent | bb6c97551f7cfafea811367de0a6f382d9aec36b (diff) |
Conditionally install bash completion
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'ct-ng.comp')
-rw-r--r-- | ct-ng.comp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/ct-ng.comp b/ct-ng.comp deleted file mode 100644 index e89e686..0000000 --- a/ct-ng.comp +++ /dev/null @@ -1,36 +0,0 @@ -# To be sourced - -_ct_ng () { - local cur prev samples show_samples actions steps start_steps stop_steps ct_ng_opts vars - COMPREPLY=() - cur=$(_get_cword) - prev=${COMP_WORDS[COMP_CWORD-1]} - - samples=$( "${COMP_WORDS[0]}" list-samples-short 2>/dev/null ) - show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/g;') - build_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1build-/g;') - check_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1check-/g;') - - steps=$(${COMP_WORDS[0]} list-steps 2>/dev/null |awk '$1 == "-" { print $2; }') - start_steps=$(echo "${steps}" |sed -r -e 's/($| )/\1+/;') - stop_steps=$(echo "${steps}" |sed -r -e 's/(^| )/+\1/;') - - actions='help menuconfig nconfig oldconfig saveconfig extractconfig - defconfig savedefconfig - build build. build-all build-all. - wiki-samples list-samples list-samples-short check-samples - list-steps - show-tuple show-all show-config - clean distclean updatetools - version' - - vars="RESTART= STOP= PREFIX= V= DEFCONFIG=" - - ct_ng_opts="${samples} ${show_samples} ${build_samples} ${check_samples} - ${steps} ${start_steps} ${stop_steps} - ${actions} ${vars}" - - COMPREPLY=($(compgen -W "${ct_ng_opts}" -- "${cur}")) - return 0 -} -complete -F _ct_ng ct-ng |