mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-29 15:44:03 +00:00
samples: add a short list of all samples
Add an action to list only the sample names. Use that for auto-completion.
This commit is contained in:
parent
e1848908de
commit
749b819c92
@ -6,9 +6,7 @@ _ct-ng () {
|
||||
cur=$(_get_cword)
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
samples=$( "${COMP_WORDS[0]}" list-samples 2>/dev/null \
|
||||
|tail -n +2 |sed -e '/^ /d; s/ .*//;' \
|
||||
)
|
||||
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;')
|
||||
|
||||
@ -18,8 +16,9 @@ _ct-ng () {
|
||||
|
||||
actions='help menuconfig oldconfig saveconfig extractconfig
|
||||
build build. build-all build-all.
|
||||
list-samples list-steps show-tuple show-all show-config
|
||||
clean distclean wiki-samples updatetools
|
||||
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="
|
||||
|
@ -53,6 +53,13 @@ PHONY += list-samples
|
||||
list-samples: FORCE
|
||||
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES)
|
||||
|
||||
PHONY += list-samples-short
|
||||
list-samples-short: FORCE
|
||||
$(SILENT)for s in $(CT_SAMPLES); do \
|
||||
printf "$${s}\n"; \
|
||||
done
|
||||
|
||||
PHONY += wiki-samples
|
||||
wiki-samples:
|
||||
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user