mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-05 12:00:17 +00:00
ee0338d5b0
This patch contains several amends for 0.3.0 and other minor documentation corrections. Major documentation revision and rewrite. fisher help shows fisher(1) by default now. Fix a critical bug that was causing fisher uninstall --force to remove not the symbolic link, but the actual files. Closes #24 Rename orphan tag to custom for plugins installed using a custom URL. warning Remove fisher --link flag and create symbolic links by default for local paths. The user does not have to worry about symbolic links or whether the copy is as symbolic link or not anymore. If the user tries to install a local path, then the best thing to do is to create a symbolic link. This also eliminates the need to call update. warning Remove fisher --cache and fisher --validate. Now, that these options are separated into their own function and they are intentionally private, there is no need for them.
58 lines
1.4 KiB
Fish
58 lines
1.4 KiB
Fish
set -l cmd awk
|
|
set -l fishfile $DIRNAME/fixtures/fishfile
|
|
|
|
function -S setup
|
|
set -g fisher_alias "$cmd=A,B"
|
|
|
|
function fisher_$cmd
|
|
if not set -q argv[1]
|
|
echo usage:...
|
|
return 1
|
|
end
|
|
awk $argv
|
|
end
|
|
end
|
|
|
|
function -S teardown
|
|
functions -e fisher_$cmd
|
|
end
|
|
|
|
test "read a fishfile using --file"
|
|
(fisher --file=$fishfile) = foo bar baz github/foo/bar
|
|
end
|
|
|
|
test "fisher --list retrieves plugin names in the cache"
|
|
(fisher --list) = (
|
|
for file in $fisher_cache/*
|
|
basename $file
|
|
end)
|
|
end
|
|
|
|
test "evaluate commands"
|
|
(fisher $cmd) = usage:...
|
|
end
|
|
|
|
test "evaluate commands w/ standard input"
|
|
(echo "foo bar baz" | fisher $cmd '{ print $2 }' | xargs) = "bar"
|
|
end
|
|
|
|
test "display version information"
|
|
(fisher --version | cut -d " " -f3) = (sed 1q $fisher_home/VERSION)
|
|
end
|
|
|
|
test "evaluate \$fisher_alias=<command=alias[,...]> as aliases"
|
|
(fisher A; fisher B) = (fisher $cmd; fisher $cmd)
|
|
end
|
|
|
|
test "display usage"
|
|
(fisher | sed 1q) = "usage: fisher <command> [<options>] [--version] [--help]"
|
|
end
|
|
|
|
test "display help information about 'help' at the bottom"
|
|
(fisher | tail -n2 | xargs) = "Use fisher help -g to list guides and other documentation. See fisher help <command or concept> to access a man page."
|
|
end
|
|
|
|
test "display basic help information about available commands"
|
|
(fisher | sed -E 's/ +//' | grep "^$cmd\$")
|
|
end
|