mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-19 09:25:40 +00:00
e0ed629777
* Add Mizuki to THANKS for help with Japanese translation of the QuickStart Guide. * fisher --list should return 1 (fail) if no plugins are installed. Closes #101. * More consistent style 'Usage' instead of 'usage'. * Silence index check in case $fisher_cache/.index does not exist. * Add more descriptive message if plugin is not found. * Silence search failure in case $fisher_cache/.index does not exist.
1.5 KiB
1.5 KiB
fisher-commands(7) -- Creating Fisherman Commands
SYNOPSIS
This document describes how to add new commands to Fisherman. A Fisherman command is a function that you can invoke using the fisher
CLI, for example:
fisher my_command [*options*]
DESCRIPTION
To add a command, create a function fisher_<my_command>
:
function fisher_hello -d "Hello, how are you?"
echo hello
end
Test it works: fisher hello
.
To make this function available to future fish sessions, add it to $XDG_CONFIG_HOME/fish/functions
:
funcsave fisher_hello
You can also create a local plugin and install it with Fisherman:
mkdir fisher_hello
cd fisher_hello
functions fisher_hello > fisher_hello.fish
fisher install .
The method described above will create a symbolic link to the fisher_hello
directory and fisher_hello.fish
inside $fisher_config/functions
.
EXAMPLES
The following example implements a command to retrieve plugin information and format the output into columns.
function fisher_info -d "Display information about plugins"
switch "$argv"
case -h --help
printf "Usage: fisher info name | URL [...]\n\n"
printf " -h --help Show usage help\n"
return
end
for item in $argv
fisher search $item --name --info
end | sed -E 's/;/: /' | column
end
SEE ALSO
fisher(1)
fisher help tour
funcsave(1)
fisher help plugins