mirror of
https://github.com/jorgebucaran/fisher
synced 2024-08-17 12:31:05 +02:00
+ Add the ability to install plugins from Gists. You can distribute a very simple, one-single function plugin in the form of a Gist. Your users can install it using fisher install url and Fisherman will query the Gist using the GitHub API to get a list of the Gist files and use the name of the first identified *.fish file to name the plugin in your system. Since there is no formal way to name a Gist, and you may prefer to keep the "description" field for the actual description and not a name, Fisherman supports only one fish file per Gist. Closes #75. + Use command(1) when calling non-builtins. Thanks @daenney. Closes #79. + Add __fisher_plugin_can_enable to detect installing a prompt that is not the current one. Closes #78. + Remove the ability to install a plugin in a parent directory using .. or ../ or even worse, ../../ as well as other combinations that navigate to a parent directory. I find the use case odd at best, and more dangerous that useful. If you want to install a local plugin use the full path or a relative path, always top down. fisher install . or fisher install my/plugin or fisher install /Users/$USER/path/to/plugin. Closes #81.
42 lines
1.2 KiB
Fish
42 lines
1.2 KiB
Fish
test "$TESTNAME - Remove trailing .git"
|
|
https://github.com/a/b = (__fisher_plugin_validate https://github.com/a/b.git)
|
|
end
|
|
|
|
for slash in "/" "//" "///"
|
|
test "$TESTNAME - Remove trailing slash/es $slash"
|
|
https://github.com/a/b = (__fisher_plugin_validate https://github.com/a/b$slash)
|
|
end
|
|
end
|
|
|
|
for s in "" s
|
|
for url in "http$s"{//a/b,/a/b,:a/b,:/a/b}
|
|
test "$TESTNAME - Normalize <$url> to <http$s://*>"
|
|
"http$s://a/b" = (__fisher_plugin_validate $url)
|
|
end
|
|
end
|
|
end
|
|
|
|
for url in a/b gh/a/b gh:a/b github/a/b https://github.com/a/b
|
|
test "$TESTNAME - Fix GitHub URLs <$url>"
|
|
https://github.com/a/b = (__fisher_plugin_validate gh:a/b)
|
|
end
|
|
end
|
|
|
|
for url in bb/a/b bb:a/b github/a/b https://github.com/a/b
|
|
test "$TESTNAME - Fix BitBucket URLs <$url>"
|
|
https://github.com/a/b = (__fisher_plugin_validate gh:a/b)
|
|
end
|
|
end
|
|
|
|
for url in omf/a omf:a
|
|
test "$TESTNAME - Fix Oh My Fish! URLs <$url>"
|
|
"https://github.com/oh-my-fish/a" = (__fisher_plugin_validate $url)
|
|
end
|
|
end
|
|
|
|
test "$TESTNAME - Add https:// to gist.github.com URLs"
|
|
https://gist.github.com/owner/1234567890 = (
|
|
__fisher_plugin_validate gist.github.com/owner/1234567890
|
|
)
|
|
end
|