From ed7e0c08e8b4d7ad0778753872848e5ed35ea820 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Thu, 5 May 2016 22:29:55 +0900 Subject: [PATCH] Do not hide installed plugins in fisher ls-remote. Close #250. --- fisher.fish | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/fisher.fish b/fisher.fish index d5dff9b..77c4652 100644 --- a/fisher.fish +++ b/fisher.fish @@ -1027,24 +1027,13 @@ function __fisher_list_remote -a format set -e argv[1] set -l keys $argv - set -l config "$fisher_config"/* - - command awk -v FS=\t -v format_s="$format" -v config="$config" -v keys="$keys" ' + command awk -v FS=\t -v format_s="$format" -v keys="$keys" ' function basename(s, n, a) { n = split(s, a, "/") return a[n] } - function plugin_is_config(item, i) { - for (i = 1; i <= config_count; i++) { - if (item == config_a[i]) { - return 1 - } - } - return 0 - } - function plugin_is_blacklisted(item) { return (item ~ /^awesome-fish|^fisherman|^index|^logo|^taof/) } @@ -1060,11 +1049,6 @@ function __fisher_list_remote -a format BEGIN { keys_count = split(keys, keys_a, " ") - config_count = split(config, config_a, " ") - - for (i = 1; i <= config_count; i++) { - config_a[i] = basename(config_a[i]) - } } { @@ -1075,10 +1059,8 @@ function __fisher_list_remote -a format next } } - } else { - if (!plugin_is_config($1) && !plugin_is_blacklisted($1)) { - record_printf(format_s, $1, $2, $3, $4) - } + } else if (!plugin_is_blacklisted($1)) { + record_printf(format_s, $1, $2, $3, $4) } }