mirror of
https://github.com/jorgebucaran/fisher
synced 2024-06-28 23:01:50 +02:00
Simplify install/update regexes
This commit is contained in:
parent
da228c9f70
commit
8fde904564
|
@ -156,10 +156,10 @@ function fisher -a cmd -d "Fish plugin manager"
|
||||||
contains -- $plugin $install_plugins && set --local event install || set --local event update
|
contains -- $plugin $install_plugins && set --local event install || set --local event update
|
||||||
echo -es "Installing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
|
echo -es "Installing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
|
||||||
|
|
||||||
for file in (string match --entire --regex -- "[functions/|conf\.d/].*fish\$" $$plugin_files_var)
|
for file in (string match --regex --invert -- '.+/completions/.+\.fish$' $$plugin_files_var)
|
||||||
source $file
|
source $file
|
||||||
if string match --quiet --regex -- "conf\.d/" $file
|
if set --local name (string replace --regex -- '.+conf\.d/(.+)\.fish$' '$1' $file)
|
||||||
emit (string replace --all --regex -- '^.*/|\.fish$' "" $file)_$event
|
emit {$name}_$event
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue