Do not hide installed plugins in fisher ls-remote. Close #250.

This commit is contained in:
Jorge Bucaran 2016-05-05 22:29:55 +09:00
parent bc76864e17
commit ed7e0c08e8
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -1027,24 +1027,13 @@ function __fisher_list_remote -a format
set -e argv[1] set -e argv[1]
set -l keys $argv set -l keys $argv
set -l config "$fisher_config"/* command awk -v FS=\t -v format_s="$format" -v keys="$keys" '
command awk -v FS=\t -v format_s="$format" -v config="$config" -v keys="$keys" '
function basename(s, n, a) { function basename(s, n, a) {
n = split(s, a, "/") n = split(s, a, "/")
return a[n] 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) { function plugin_is_blacklisted(item) {
return (item ~ /^awesome-fish|^fisherman|^index|^logo|^taof/) return (item ~ /^awesome-fish|^fisherman|^index|^logo|^taof/)
} }
@ -1060,11 +1049,6 @@ function __fisher_list_remote -a format
BEGIN { BEGIN {
keys_count = split(keys, keys_a, " ") 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 next
} }
} }
} else { } else if (!plugin_is_blacklisted($1)) {
if (!plugin_is_config($1) && !plugin_is_blacklisted($1)) { record_printf(format_s, $1, $2, $3, $4)
record_printf(format_s, $1, $2, $3, $4)
}
} }
} }