From 55199383929bd5cc12b5142dc9185dc8d6a556f1 Mon Sep 17 00:00:00 2001 From: Michael Ikey Doherty Date: Thu, 3 Apr 2014 12:06:47 +0100 Subject: [PATCH] Support .kiwi files for bash-completion This commit enables osc to provide completion for both .spec and .kiwi files, and ensures no ugly "not found" messages are displayed in the terminal due to globbing. --- dist/osc.complete | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/osc.complete b/dist/osc.complete index 50bc89c9..129f63b9 100644 --- a/dist/osc.complete +++ b/dist/osc.complete @@ -437,8 +437,9 @@ build) done fi if ((count == 2)) ; then - specs=($(command ls *.spec)) - builtin compgen -W "${opts[*]} ${specs[*]}" -- "${cmdline[count]}" + specs=($(command ls *.spec 2>/dev/null)) + images=($(command ls *.kiwi 2>/dev/null)) + builtin compgen -W "${opts[*]} ${specs[*]} ${images[*]}" -- "${cmdline[count]}" fi ;; branch|getpac|bco|branchco)