summaryrefslogtreecommitdiff
path: root/ct-ng.comp
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-03-05 08:00:07 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-03-05 08:00:07 (GMT)
commit05cde88ba9d556aa0edafe583d1f05a772aafa84 (patch)
treed6fcc2f1d9816b3de4d7203991d3d437c33b0e0f /ct-ng.comp
parentcbc8a652373455cb7475ebd7d7e0c041f623871a (diff)
scripts: fix completion to show samples
Diffstat (limited to 'ct-ng.comp')
-rw-r--r--ct-ng.comp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ct-ng.comp b/ct-ng.comp
index f6759a7..a6ad19c 100644
--- a/ct-ng.comp
+++ b/ct-ng.comp
@@ -6,7 +6,9 @@ _ct-ng () {
cur=$(_get_cword)
prev=${COMP_WORDS[COMP_CWORD-1]}
- samples=$(${COMP_WORDS[0]} list-samples 2>/dev/null)
+ samples=$( ${COMP_WORDS[0]} list-samples 2>/dev/null \
+ |sed -r -e 's/^(.*) \(host: (.*)\)$/\2,\1/;' \
+ )
show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/g;')
build_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1build-/g;')