summaryrefslogtreecommitdiff
path: root/ct-ng.comp
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-07-30 21:30:02 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-07-30 21:30:02 (GMT)
commit749b819c92d213224e5f3a98364a76d4f3e2519c (patch)
tree51b3cef87ac06632e8e0afd5114095e02f8b3b85 /ct-ng.comp
parente1848908de4c6f8723fdc84ee109f36a62a28475 (diff)
samples: add a short list of all samples
Add an action to list only the sample names. Use that for auto-completion.
Diffstat (limited to 'ct-ng.comp')
-rw-r--r--ct-ng.comp9
1 files changed, 4 insertions, 5 deletions
diff --git a/ct-ng.comp b/ct-ng.comp
index c8c6301..9bf4890 100644
--- a/ct-ng.comp
+++ b/ct-ng.comp
@@ -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="