From 2709c38c4ebb121d1c98378f02ca1d7589730758 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Wed, 16 Mar 2016 15:00:40 +0900 Subject: [PATCH] Do not print an empty lines if there are no plugins. --- functions/fisher_list.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/fisher_list.fish b/functions/fisher_list.fish index c3dba85..11949ee 100644 --- a/functions/fisher_list.fish +++ b/functions/fisher_list.fish @@ -1,7 +1,7 @@ function fisher_list -a key -d "List installed plugins" set -l enabled - if test -s "$fisher_file" + if test -f "$fisher_file" set enabled (__fisher_list < $fisher_file) end @@ -40,7 +40,9 @@ function fisher_list -a key -d "List installed plugins" find $fisher_cache/* -maxdepth 0 -type l ^ /dev/null | sed 's|.*/||' case --enabled - printf "%s\n" $enabled + if test ! -z "$enabled" + printf "%s\n" $enabled + end case --disabled for name in (__fisher_cache_list)