From 0caa5c3a210a791ac4c735dcfc9dd6ee263ff8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Dunand?= Date: Wed, 20 Jun 2012 11:03:43 +0200 Subject: [PATCH] Don't display error when complete an IS repository or image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Luttringer --- completion/bash/is | 6 +++--- completion/zsh/_installsystems | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/completion/bash/is b/completion/bash/is index 9fcb822..b96ff4e 100644 --- a/completion/bash/is +++ b/completion/bash/is @@ -15,17 +15,17 @@ # list local repositories _local_repo() { - COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync repo --local)" -- "$cur")) + COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync repo --local 2>/dev/null)" -- "$cur")) } # list all defined repositories _repo() { - COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync repo)" -- "$cur")) + COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync repo 2>/dev/null)" -- "$cur")) } # list all images available in any online repositories _remote_image() { - COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync list '*/*:*')" -- "$cur")) + COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --quiet --no-color --no-sync list '*/*:*' 2>/dev/null)" -- "$cur")) } # list all local (files) images diff --git a/completion/zsh/_installsystems b/completion/zsh/_installsystems index 59a47bb..6615865 100644 --- a/completion/zsh/_installsystems +++ b/completion/zsh/_installsystems @@ -20,7 +20,7 @@ (( $+functions[_installsystems_local_repo] )) || _installsystems_local_repo() { local repos expl - repos=($(_call_program options is --quiet --no-color --no-sync repo --local)) + repos=($(_call_program options is --quiet --no-color --no-sync repo --local 2>/dev/null)) _wanted list expl 'local repo' compadd ${expl} - ${repos} } @@ -28,7 +28,7 @@ _installsystems_local_repo() { (( $+functions[_installsystems_repo] )) || _installsystems_repo() { local repos expl - repos=($(_call_program options is --quiet --no-color --no-sync repo)) + repos=($(_call_program options is --quiet --no-color --no-sync repo 2>/dev/null)) _wanted list expl 'repo' compadd ${expl} - ${repos} } @@ -36,7 +36,7 @@ _installsystems_repo() { (( $+functions[_installsystems_remote_images] )) || _installsystems_remote_images() { local images expl - images=($(_call_program options is --quiet --no-color --no-sync list "'*/*:*'")) + images=($(_call_program options is --quiet --no-color --no-sync list "'*/*:*'" 2>/dev/null)) _wanted list expl 'remote image' compadd ${expl} - ${images} } @@ -44,8 +44,8 @@ _installsystems_remote_images() { (( $+functions[_installsystems_local_images] )) || _installsystems_local_images() { local localrepos expl images - localrepos=${(j:,:)${$(_call_program options is --quiet --no-color --no-sync repo --local)}} - images=($(_call_program options is --quiet --no-color --no-sync -s ${localrepos} -f ${localrepos} list "'*/*:*'")) + localrepos=${(j:,:)${$(_call_program options is --quiet --no-color --no-sync repo --local 2>/dev/null)}} + images=($(_call_program options is --quiet --no-color --no-sync -s ${localrepos} -f ${localrepos} list "'*/*:*'" 2>/dev/null)) _wanted list expl 'local image' compadd ${expl} - ${images} } -- GitLab