crosstool-ng/ct-ng.comp
Yann E. MORIN" 5e9d4ba24f kconfig: rename the defconfig and olddefconfig targets
What 'defconfig' really does is save the current .config to a defconfig,
so it is better named 'savedefconfig' (as other projects do).

What 'olddefconfig' really does is create a .config from a defconfig,
so rename it to 'defconfig' (as other projects do, too).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-22 00:34:15 +01:00

35 lines
1.2 KiB
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-short 2>/dev/null )
show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/g;')
build_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1build-/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 oldconfig saveconfig extractconfig
defconfig savedefconfig
build build. build-all build-all.
wiki-samples list-samples list-samples-short list-steps
show-tuple show-all show-config
clean distclean updatetools
tarball version'
vars="RESTART= STOP= PREFIX= V= DEFCONFIG="
ct_ng_opts="${samples} ${show_samples} ${build_samples}
${steps} ${start_steps} ${stop_steps}
${actions} ${vars}"
COMPREPLY=($(compgen -W "${ct_ng_opts}" -- "${cur}"))
return 0
}
complete -F _ct_ng ct-ng