mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-03 15:40:27 +00:00
6c5cac3a18
Notable changes: + Now fisher list does not show plugins that are disabled, but available in the cache. To preview these items use fisher list --disabled. + Welcome aboard @orangecms and @xrain0610. + Fisherman is now available in AUR, thanks @orangecms. + Fix load order during installation. Now snippets can safely invoke functions defined in the plugin function directory. Thanks @orangecms. #170. + Fisherman **installs and updates plugins ⌁concurrently**. Performance may vary, but if you can see 5 to 10 times faster network times, it's working well.
49 lines
1.2 KiB
Fish
49 lines
1.2 KiB
Fish
set -l path $DIRNAME/.t-$TESTNAME-(random)
|
|
set -l fisherman_url https://github.com/fisherman/fisherman
|
|
|
|
function -S setup
|
|
mkdir -p $path/cache/{foo,bar,baz,norf} $path/theme
|
|
|
|
ln -s $path/theme $path/cache/theme
|
|
|
|
printf "%s\n" foo bar baz theme > $path/fishfile
|
|
|
|
set -g fisher_cache $path/cache
|
|
set -g fisher_file $path/fishfile
|
|
set -U fisher_prompt theme
|
|
|
|
source $DIRNAME/helpers/git-ls-remote.fish
|
|
end
|
|
|
|
function -S teardown
|
|
rm -rf $path
|
|
functions -e git
|
|
end
|
|
|
|
test "$TESTNAME - Append @ to linked theme"
|
|
(fisher list | sed -n '/@.*/p') = "@ theme"
|
|
end
|
|
|
|
test "$TESTNAME - Indent plugins to match indent when links or prompts are installed"
|
|
(fisher list | sed -n '/ .*/p' | xargs) = "foo bar baz"
|
|
end
|
|
|
|
test "$TESTNAME - Do not display disabled plugins"
|
|
-z (
|
|
rm $path/fishfile
|
|
fisher list
|
|
)
|
|
end
|
|
|
|
test "$TESTNAME - Show active / enabled plugins/prompts with fisher list=enabled"
|
|
foo bar baz theme = (fisher list --enabled)
|
|
end
|
|
|
|
test "$TESTNAME - Show disabled/inactive plugins/prompts with fisher list=disabled"
|
|
(fisher list --disabled) = norf
|
|
end
|
|
|
|
test "$TESTNAME - Parse a fishfile and display plugins with fisher list=<file>"
|
|
foo bar baz theme = (fisher list - < $fisher_file)
|
|
end
|