mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 12:57:53 +00:00
c7771e81fa
- be silent in case of errors - also suggest 'build.' /trunk/ct-ng.comp | 6 3 3 0 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
31 lines
1010 B
Plaintext
31 lines
1010 B
Plaintext
# 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 2>/dev/null)
|
|
show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/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='config menuconfig oldconfig saveconfig
|
|
list-samples build build. list-steps regtest regtest-local
|
|
regtest-global clean distclean wiki-samples updatetools
|
|
tarball'
|
|
|
|
vars="RESTART= STOP="
|
|
|
|
ct_ng_opts="${samples} ${show_samples}
|
|
${steps} ${start_steps} ${stop_steps}
|
|
${actions} ${vars}"
|
|
|
|
COMPREPLY=($(compgen -W "${ct_ng_opts}" -- "${cur}"))
|
|
return 0
|
|
}
|
|
complete -F _ct-ng ct-ng
|