mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-05 09:32:37 +02:00
Do not hide installed plugins in fisher ls-remote. Close #250.
This commit is contained in:
parent
bc76864e17
commit
ed7e0c08e8
1 changed files with 3 additions and 21 deletions
22
fisher.fish
22
fisher.fish
|
@ -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,12 +1059,10 @@ 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
' < "$index"
|
' < "$index"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue