From f57ef1b4b5a15bef9cdcbd57b3deb32d76089682 Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Thu, 12 Nov 2015 12:41:36 +0000 Subject: [PATCH] Suppress basename usage output When using basename without any arguments, a usage helper as following is displayed: ``` usage: basename string [suffix] basename [-a] [-s suffix] string [...] ``` When listing the installed packages, if no theme was installed (e.g. first installation), the `themes/` folder are empty and the usage helper is displayed. This change addresses it by suppressing the message. --- pkg/omf/cli/omf.packages.list.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/omf/cli/omf.packages.list.fish b/pkg/omf/cli/omf.packages.list.fish index b633186..9cc1225 100644 --- a/pkg/omf/cli/omf.packages.list.fish +++ b/pkg/omf/cli/omf.packages.list.fish @@ -55,7 +55,7 @@ function __omf.packages.list.installed -a type contains $package (__omf.packages.builtin); or set list $list $package end - test "$type" = "--plugin"; or for package in (basename -a {$OMF_CONFIG,$OMF_PATH}/themes/*) + test "$type" = "--plugin"; or for package in (basename -a {$OMF_CONFIG,$OMF_PATH}/themes/* 2>/dev/null) set list $list $package end