From 3865fbbf5e2a5bbd3cbe759038f2301abf0e3f2b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 5 Mar 2010 09:00:07 +0100 Subject: [PATCH] scripts: fix completion to show samples (transplanted from bf1f86bdd79fd20126d20795f425f603a5544952) --- ct-ng.comp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct-ng.comp b/ct-ng.comp index e14b48ea..efcfdc40 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;')