Merge pull request #33 from fisherman/v031

Ahoy! Fisherman gets a super patch v0.3.1
pull/445/head
Jorge Bucaran 9 years ago
commit 66fa752461
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30

@ -1,11 +1,28 @@
# Change Log # Change Log
* [0.3.1](#031)
* [0.3.0](#030) * [0.3.0](#030)
* [0.2.0](#020) * [0.2.0](#020)
* [0.1.0](#010) * [0.1.0](#010)
## [0.3.0][v030] - 2016-01-05 ## [0.3.0][v030] - 2016-01-08
> 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.
## [0.3.0][v030] - 2016-01-08
> This release contains several breaking changes a few major improvements. The good news is that the API is starting to look more stable and very unlikely to change drastically again in the future. > This release contains several breaking changes a few major improvements. The good news is that the API is starting to look more stable and very unlikely to change drastically again in the future.
@ -65,7 +82,7 @@
* Remove `fisher --cache=base` and make it return the base names of all directories in the path by default. To get the full path use printf `printf "$fisher_cache/%s" (fisher --list)` * Remove `fisher --cache=base` and make it return the base names of all directories in the path by default. To get the full path use printf `printf "$fisher_cache/%s" (fisher --list)`
* Rename undocumented `fisher --translate` flag (again) to `fisher --cache`. This function reads the standard input for a name, URL or local path and calculates the plugin's path relative to the cache. For a name this is simple `$fisher_cache/<name>` for an URL, retrieve the remote URL of every repository until there is a match with the given URL and return the path in the cache of that repository. Finally, if the input is a * Rename undocumented `fisher --translate` flag (again) to `fisher --cache`. This function reads the standard input for a name, URL or local path and calculates the plugin's path relative to the cache. For a name this is simple `$fisher_cache/<name>` for an URL, retrieve the remote URL of every repository until there is a match with the given URL and return the path in the cache of that repository. Finally, if the input is a local path of the form `file:///` it will pass it as is.
* Revert #3. The reason `getopts.fish` was in its own file originally is because @bucaran wanted a standalone, dependency free cli parser solution, arguably slightly faster than having Awk read `getopts.awk` for each use. The performance improvement is negligible at best, but `getopts` is also used by every single command and future commands and plugins are very likely to use it as well, so we might as well use the slightly faster version. * Revert #3. The reason `getopts.fish` was in its own file originally is because @bucaran wanted a standalone, dependency free cli parser solution, arguably slightly faster than having Awk read `getopts.awk` for each use. The performance improvement is negligible at best, but `getopts` is also used by every single command and future commands and plugins are very likely to use it as well, so we might as well use the slightly faster version.
@ -80,7 +97,7 @@
* ~~Add `fisher --cache[=base]` option to retrieve contents in `$fisher_cache`, eliminating flaky usage of `find(1)`~~. Closes #11. * ~~Add `fisher --cache[=base]` option to retrieve contents in `$fisher_cache`, eliminating flaky usage of `find(1)`~~. Closes #11.
* Fisherman now generates information about plugins installed via custom URLs. For the description, a shortened version of the URL is used. For the URL the full URL is used. For tags, the URL is fuzzily checked and tags such as _theme_, _plugin_, _config_ and _omf_ are added. The tag _orphan_ is added by default as well. Finally, the author is generated by retrieving the e-mail or username of the author of the first commit in the plugin's repository. Closes #9 and #14. * Fisherman now generates information about plugins installed via custom URLs. For the description, a shortened version of the URL is used. For the URL the full URL is used. For tags, the URL is fuzzily checked and tags such as _theme_, _plugin_, _config_ and _omf_ are added. The tag ~~_orphan_~~ **custom** is added by default as well. Finally, the author is generated by retrieving the e-mail or username of the author of the first commit in the plugin's repository. Closes #9 and #14.
* ~~Change `--path-in-cache` to `--translate.` This function translates an name or supported URL/URL variation into a path inside `$fisher_cache`. This allows you to treat plugins installed via custom URLs almost like regular plugins if they are installed. Closes #8.~~ * ~~Change `--path-in-cache` to `--translate.` This function translates an name or supported URL/URL variation into a path inside `$fisher_cache`. This allows you to treat plugins installed via custom URLs almost like regular plugins if they are installed. Closes #8.~~

@ -35,7 +35,7 @@ This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at [Fisherman][email]. All reported by contacting a project maintainer at [hi@fisherman.sh](mailto:hi@fisherman.sh). All
complaints will be reviewed and investigated and will result in a response that complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an obligated to maintain confidentiality with regard to the reporter of an
@ -50,6 +50,5 @@ version 1.3.0, available at
<!-- Links --> <!-- Links -->
[email]: mailto:j@bucaran.me
[version]: http://contributor-covenant.org/version/1/3/0/ [version]: http://contributor-covenant.org/version/1/3/0/
[homepage]: http://contributor-covenant.org [homepage]: http://contributor-covenant.org

@ -1,12 +1,8 @@
# Contributing to Fisherman # Contributing to Fisherman
You can start contributing right away: [![Wharf][wharf-badge]][wharf-link]
* [Join][join] the community. If you are looking for ways to help, peruse the [open issues][issues]. If you are already working on something, feel free to send us a PR.
* [Spread][tweet] the voice.
* Report [bugs][bugs].
If you are looking for other ways to help, peruse [open issues][issues]. If you are already working on something, feel free to send us a PR.
## Guidelines ## Guidelines
@ -19,23 +15,31 @@ If you are looking for other ways to help, peruse [open issues][issues]. If you
* Follow the [seven rules][seven-rules] of a great git commit message. * Follow the [seven rules][seven-rules] of a great git commit message.
## Addons ## Plugins
Third-party plugins are essential for keeping this project exciting. To learn how to create your own plugins and other extensions see `fisher help plugins`. Third-party plugins are essential for keeping this project exciting. To learn how to create your own plugins and other extensions see `fisher help plugins`.
To browse the available content use `fisher search` or see the [Fisherman Index][fisher-index]. To browse the available content use `fisher search` or see the [Fisherman Index][fisher-index].
:anchor:
<!-- Links --> <!-- Links -->
[org]: https://github.com/fisherman [org]: https://github.com/fisherman
[join]: https://gitter.im/fisherman/wharf
[bugs]: https://github.com/fisherman/fisherman/issues [bugs]: https://github.com/fisherman/fisherman/issues
[issues]: https://github.com/fisherman/fisherman/issues?q=is%3Aopen+is%3Aissue [issues]: https://github.com/fisherman/fisherman/issues?q=is%3Aopen+is%3Aissue
[fishtape]: https://github.com/fisherman/fishtape [fishtape]: https://github.com/fisherman/fishtape
[fish-docs]: http://fishshell.com/docs/current/index.html [fish-docs]: http://fishshell.com/docs/current/index.html
[seven-rules]: http://chris.beams.io/posts/git-commit/#seven-rules [seven-rules]: http://chris.beams.io/posts/git-commit/#seven-rules
[fisher-index]: https://github.com/fisherman/fisher-index [fisher-index]: https://github.com/fisherman/fisher-index
[tweet]: https://twitter.com/intent/tweet?url=https%3A%2F%2Fgit.io%2Ffisher&via=jbucaran&text=Check+out+%23Fisherman+for+the+%23fishshell [wharf-link]: https://fisherman-wharf.herokuapp.com/
:anchor: [wharf-badge]: https://img.shields.io/badge/wharf-join%20the%20chat-00cc99.svg?style=flat-square

@ -28,8 +28,8 @@ all: $(FISH_CONFIG) $(FISHER_CACHE) $(AUTHORS) $(DOCS)
echo "Downloading the index for the first time...";\ echo "Downloading the index for the first time...";\
fish -c "fisher_update --index";\ fish -c "fisher_update --index";\
fi fi
@$(call MSG,"Reset your shell and type 'fisher <command>' to use Fisherman.") @$(call MSG,"Reset your shell and type 'fisher <command>' to use Fisherman")
@fish -c "fisher -h" | sed -n '5,$$p' @fish -c "fisher help -a" | sed -n '3,$$p'
test: test:
@fish -c "fishtape test/*.fish" @fish -c "fishtape test/*.fish"
@ -76,5 +76,4 @@ $(AUTHORS): $(FISHER_HOME)
sed -E 's/([^<>]+)<([^<>]*)>/* \1 \&lt;[\2](mailto:\2)\&gt;/' >> $@ sed -E 's/([^<>]+)<([^<>]*)>/* \1 \&lt;[\2](mailto:\2)\&gt;/' >> $@
%.1 %.5 %.7: %.md %.1 %.5 %.7: %.md
@echo "Creating the documentation..."
-@ronn --manual=fisherman --roff $? 1>&2 2> /dev/null -@ronn --manual=fisherman --roff $? 1>&2 2> /dev/null

@ -25,7 +25,6 @@ Features include a flat tree structure, external self-managed database, cache sy
git clone https://github.com/fisherman/fisherman git clone https://github.com/fisherman/fisherman
cd fisherman cd fisherman
make make
fisher help
``` ```
## Contributing ## Contributing

@ -1,31 +1,29 @@
complete -xc fisher -d "Fisherman" complete -xc fisher -d "Ahoy! Fisherman"
complete -c fisher -n "__fish_seen_subcommand_from search" -a "\t" complete -c fisher -n "__fish_seen_subcommand_from search" -a "\t"
complete -c fisher -n "__fish_use_subcommand" -s v -l version -d "Show version information"
complete -c fisher -n "__fish_use_subcommand" -s h -l help -d "Display help"
complete -c fisher -n "__fish_use_subcommand" -s f -l file -d "Read fishfile"
complete -c fisher -n "__fish_use_subcommand" -s a -l alias -d "Define one or more comma-separated command aliases"
complete -c fisher -n "__fish_use_subcommand" -s l -l list -d "List plugins in the cache" complete -c fisher -n "__fish_use_subcommand" -s l -l list -d "List plugins in the cache"
complete -c fisher -n "__fish_use_subcommand" -s f -l file -d "Read a fishfile"
complete -c fisher -n "__fish_use_subcommand" -s h -l help -d "Display help"
complete -c fisher -n "__fish_use_subcommand" -s a -l alias -d "Define command aliases"
complete -c fisher -n "__fish_use_subcommand" -s v -l version -d "Show version information"
set -l IFS ";" set -l IFS ";"
for option in commands guides for option in commands guides
fisher_help --$option=bare | sed -E 's/^ *([^ ]+) *(.*)/\1;\2/' | while read -l func info fisher_help --$option=bare | sed -E 's/^ *([^ ]+) *(.*)/\1;\2/' | while read -l cmd info
complete -c fisher -n "__fish_seen_subcommand_from help" -a $func -d "$info" complete -c fisher -n "__fish_seen_subcommand_from help" -a $cmd -d "$info"
if test $option = guides if test $option = guides
continue continue
end end
complete -c fisher -n "__fish_use_subcommand" -a $func -d "$info" complete -c fisher -n "__fish_use_subcommand" -a $cmd -d "$info"
fisher_help --usage=$func | __fisher_complete OFS=';' | while read -l 1 2 3 fisher_help --usage=$cmd | __fisher_complete OFS=';' | while read -l 1 2 3
complete -c fisher -n "__fish_seen_subcommand_from $func" -s "$3" -l "$2" -d "$1" complete -c fisher -n "__fish_seen_subcommand_from $cmd" -s "$3" -l "$2" -d "$1"
end end
end end
end end
if test -e $fisher_cache/.index
__fisher_complete_cache update uninstall __fisher_complete_cache update uninstall
__fisher_complete_remote install __fisher_complete_remote install
end

@ -5,6 +5,6 @@ complete -xc wait -d "Run commands and wait with a spin"
complete -xc wait -n "not __fish_seen_subcommand_from --spin" -a "\t" complete -xc wait -n "not __fish_seen_subcommand_from --spin" -a "\t"
set -l IFS \t set -l IFS \t
wait --help | __fisher_complete | while read -l 1 2 3 wait -h | __fisher_complete | while read -l 1 2 3
complete -c wait -s "$3" -l "$2" -d "$1" complete -c wait -s "$3" -l "$2" -d "$1"
end end

@ -11,3 +11,7 @@ set fish_complete_path {$fisher_config,$fisher_home}/completions $fish_complete_
for file in $fisher_config/conf.d/*.config.fish for file in $fisher_config/conf.d/*.config.fish
source $file source $file
end end
function d
printf "((%s))\n" $argv >&2
end

@ -1,4 +1,4 @@
function __fisher_alias -a value -d "Define one or more comma-separated command aliases." function __fisher_alias -a value -d "Define command aliases"
switch "$value" switch "$value"
case "" case ""
if test -z "$fisher_alias" if test -z "$fisher_alias"

@ -1,8 +1,18 @@
function __fisher_cache -d "Calculate path of a name, url or path relative to the cache" function __fisher_cache -a error -d "Get plugin in cache from a name, url or path"
if test -z "$error"
set error /dev/stderr
end
while read --prompt="" -l item while read --prompt="" -l item
switch "$item" switch "$item"
case file:///\* case file:///\*
printf "%s\n" $item for file in $fisher_cache/*
switch "$item"
case file://(readlink $file)
printf "%s\n" $file
break
end
end
case \*/\* case \*/\*
for file in $fisher_cache/* for file in $fisher_cache/*
@ -14,7 +24,18 @@ function __fisher_cache -d "Calculate path of a name, url or path relative to th
end end
case \* case \*
printf "%s\n" $fisher_cache/$item set item $fisher_cache/$item
if test -d "$item"
printf "%s\n" $item
end end
end | read -l path
if test -z "$path"
printf "fisher: Avast! '%s' is not in the cache\n" $item > $error
continue
end
printf "%s\n" $path
end end
end end

@ -1,5 +1,5 @@
# Usage # Usage
# __fisher_complete [awk_var=value] [--help] # __fisher_complete [<awk var>=value] [--help]
# #
# Example # Example
# set -l IFS \t # set -l IFS \t

@ -1,4 +1,4 @@
function __fisher_file -a file -d "Read a fishfile and display its contents" function __fisher_file -a file -d "Read a fishfiles"
switch "$file" switch "$file"
case "" case ""
set file $fisher_config/fishfile set file $fisher_config/fishfile
@ -15,5 +15,5 @@ function __fisher_file -a file -d "Read a fishfile and display its contents"
if (!duplicates[$1]++) printf("%s\n", $1) if (!duplicates[$1]++) printf("%s\n", $1)
} }
' $file ' $argv
end end

@ -1,3 +1,3 @@
function __fisher_name -d "Generate a pretty name from a plugin path or URL" function __fisher_name -d "Create pretty name from a plugin path or URL"
sed -E 's|.*/(.*)|\1|; s/^(plugin|theme|pkg|omf|fish|fisher)-//' sed -E 's|.*/(.*)|\1|; s/^(plugin|theme|pkg|omf|fish|fisher)-//'
end end

@ -8,12 +8,12 @@ function __fisher_validate -d "Validate a name, url or path"
while read -lp "" item while read -lp "" item
switch "$item" switch "$item"
case \*..\* /. / case \*..\* /. /
continue return 1
end end
if test -e "$item" if test -e "$item"
if test $item = $HOME if test $item = $HOME -o $HOME = $PWD
continue return 1
end end
if test -f "$item" if test -f "$item"

@ -27,9 +27,6 @@ function fisher -d "Fish Shell Plugin Manager"
case l list case l list
set option list set option list
case c cache
set option cache
case f file case f file
set option file set option file
set value $2 set value $2
@ -77,24 +74,15 @@ function fisher -d "Fish Shell Plugin Manager"
return 1 return 1
end end
case validate
__fisher_validate | grep $quiet
case list case list
__fisher_list __fisher_list
case cache
__fisher_cache
case file case file
__fisher_file "$value" __fisher_file "$value"
case alias case alias
__fisher_alias $alias __fisher_alias $alias
case name
__fisher_name
case version case version
sed 's/^/fisher version /;q' $fisher_home/VERSION sed 's/^/fisher version /;q' $fisher_home/VERSION
@ -103,9 +91,7 @@ function fisher -d "Fish Shell Plugin Manager"
set value commands set value commands
end end
printf "usage: fisher [--version] [--help] [--list] [--quiet]\n" printf "usage: fisher <command> [<options>] [--version] [--help]\n\n"
printf " [-a <command>=alias[,...]] [-f <path>]\n"
printf " <command> [<options>]\n\n"
switch commands switch commands
case $value case $value

@ -1,6 +1,6 @@
function fisher_help -d "Display Help Information" function fisher_help -d "Show Help"
if not set -q argv[1] if not set -q argv[1]
fisher --help man fisher
return 1 return 1
end end
@ -29,12 +29,15 @@ function fisher_help -d "Display Help Information"
set option usage set option usage
set value $value $2 set value $value $2
case h help case help
set option help
case h
printf "usage: fisher help [<keyword>] [--all] [--guides] [--help]\n\n" printf "usage: fisher help [<keyword>] [--all] [--guides] [--help]\n\n"
printf " -a --all List available documentation \n" printf " -a --all List available documentation \n"
printf " -g --guides List available guides \n" printf " -g --guides List available guides \n"
printf " -u --usage[=<cmd>] Display command usage help \n" printf " -u --usage[=<cmd>] Display command usage \n"
printf " -h --help Show usage help \n" printf " -h --help Show usage help \n"
return return
@ -50,12 +53,17 @@ function fisher_help -d "Display Help Information"
end end
switch "$option" switch "$option"
case help
fisher help help
case manual case manual
switch "$value" switch "$value"
case fisherman case fisherman fisher-7 7-fisher
man $value 7 man 7 fisher
case fisher me @
case fisher me
man fisher man fisher
case \* case \*
man fisher-$value man fisher-$value
end end
@ -64,7 +72,7 @@ function fisher_help -d "Display Help Information"
if test -z "$value" if test -z "$value"
sed -E 's/^ *([^ ]+).*/\1/' | while read -l value sed -E 's/^ *([^ ]+).*/\1/' | while read -l value
if functions -q fisher_$value if functions -q fisher_$value
fisher $value --help fisher $value -h
end end
end end
else else

@ -1,4 +1,4 @@
function fisher_install -d "Enable / Install one or more plugins" function fisher_install -d "Install Plugins"
set -l items set -l items
set -l option set -l option
set -l error /dev/stderr set -l error /dev/stderr
@ -8,44 +8,47 @@ function fisher_install -d "Enable / Install one or more plugins"
case _ case _
set items $items $2 set items $items $2
case s l link
set option link
case q quiet case q quiet
set error /dev/null set error /dev/null
case h help case help
printf "usage: fisher install [<name or url> ...] [--link] [--quiet]\n" set option help
printf " [--help]\n\n"
case h
printf "usage: fisher install [<plugins>] [--quiet] [--help]\n\n"
printf " -s --link Install as symbolic links\n"
printf " -q --quiet Enable quiet mode\n" printf " -q --quiet Enable quiet mode\n"
printf " -h --help Show usage help\n" printf " -h --help Show usage help\n"
return return
case \* case \*
printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2 printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2
fisher_install --help >& 2 fisher_install -h >& 2
return 1 return 1
end end
end end
switch "$option"
case help
fisher help install
return
end
set -l time (date +%s)
set -l count 0 set -l count 0
set -l index 1 set -l index 1
set -l elapsed (date +%s)
set -l total (count $items) set -l total (count $items)
if set -q items[1] if set -q items[1]
printf "%s\n" $items printf "%s\n" $items
else else
__fisher_file - __fisher_file -
end | __fisher_validate | while read -l item end | __fisher_validate | while read -l item
switch "$item" switch "$item"
case \*/\* case \*/\*
printf "%s %s\n" $item ( printf "%s %s\n" $item (
if not fisher_search --url=$item --name if not fisher_search --name --url=$item
printf "%s\n" $item | __fisher_name printf "%s\n" $item | __fisher_name
end) end)
@ -70,27 +73,22 @@ function fisher_install -d "Enable / Install one or more plugins"
printf ">> %s\n" $name > $error printf ">> %s\n" $name > $error
case \* case \*
printf "(%s of %s) >> %s\n" $index $total $name > $error
set index (math $index + 1) set index (math $index + 1)
printf "(%s of %s) >> %s\n" $index $total $name > $error
end end
mkdir -p $fisher_config/{cache,functions,completions,conf.d,man} mkdir -p $fisher_config/{cache,functions,completions,conf.d,man}
set -l path $fisher_cache/$name set -l path $fisher_cache/$name
if not test -e $path
switch "$url" switch "$url"
case file:///\* case file:///\*
set url (printf "%s\n" $url | sed 's|file://||') if test ! -e $path
ln -sfF (printf "%s\n" $url | sed 's|file://||') $path
if test "$option" = link
ln -sF $url $path
else
cp -rf $url $path
end end
case \* case \*
if test ! -e $path
if not wait --spin=pipe --log=$fisher_error_log " if not wait --spin=pipe --log=$fisher_error_log "
git clone --quiet --depth 1 $url $path" git clone --quiet --depth 1 $url $path"
@ -155,14 +153,14 @@ function fisher_install -d "Enable / Install one or more plugins"
switch $base switch $base
case \*\?.config.fish case \*\?.config.fish
if test "$option" = link if test "$option" = link
ln -sF $file $fisher_config/conf.d/$base ln -sfF $file $fisher_config/conf.d/$base
else else
cp -f $file $fisher_config/conf.d/$base cp -f $file $fisher_config/conf.d/$base
end end
case \* case \*
if test "$option" = link if test "$option" = link
ln -sF $file $fisher_config/functions/$base ln -sfF $file $fisher_config/functions/$base
else else
cp -f $file $fisher_config/functions/$base cp -f $file $fisher_config/functions/$base
end end
@ -171,7 +169,7 @@ function fisher_install -d "Enable / Install one or more plugins"
if test "$option" = link if test "$option" = link
for file in $path/completions/*.fish for file in $path/completions/*.fish
ln -sF $file $fisher_config/completions/(basename $file) ln -sfF $file $fisher_config/completions/(basename $file)
end end
else else
cp -f $path/completions/*.fish $fisher_config/completions/ ^ /dev/null cp -f $path/completions/*.fish $fisher_config/completions/ ^ /dev/null
@ -184,7 +182,7 @@ function fisher_install -d "Enable / Install one or more plugins"
for file in $path/man/man$n/*.$n for file in $path/man/man$n/*.$n
if test "$option" = link if test "$option" = link
ln -sF $file $fisher_config/man/man$n ln -sfF $file $fisher_config/man/man$n
else else
cp -f $file $fisher_config/man/man$n cp -f $file $fisher_config/man/man$n
end end
@ -199,7 +197,7 @@ function fisher_install -d "Enable / Install one or more plugins"
set -l item $name set -l item $name
if fisher_search --name=$name --and --tag=orphan --quiet if fisher_search --name=$name --and --tag=local --quiet
set item $url set item $url
end end
@ -212,12 +210,12 @@ function fisher_install -d "Enable / Install one or more plugins"
printf "%s\n" "$item" >> $file printf "%s\n" "$item" >> $file
end end
set elapsed (math (date +%s) - $elapsed) set time (math (date +%s) - $time)
if test "$count" = 0 if test "$count" = 0
printf "No plugins were installed.\n" > $error printf "No plugins were installed.\n" > $error
return 1 return 1
end end
printf "Aye! %d plugin/s installed in %0.fs\n" $count $elapsed > $error printf "Aye! %d plugin/s installed in %0.fs\n" $count $time > $error
end end

@ -1,4 +1,5 @@
function fisher_search -d "Search Fisherman Index" function fisher_search -d "Search Plugins"
set -l option
set -l select all set -l select all
set -l fields set -l fields
set -l join "||" set -l join "||"
@ -16,7 +17,7 @@ function fisher_search -d "Search Fisherman Index"
set 1 url set 1 url
set -l url (printf "%s\n" $2 | __fisher_validate) set -l url (printf "%s\n" $2 | __fisher_validate)
if not test -z "$url" if test ! -z "$url"
set 2 $url set 2 $url
end end
@ -74,14 +75,16 @@ function fisher_search -d "Search Fisherman Index"
case q quiet case q quiet
set quiet 1 set quiet 1
case h help case help
printf "usage: fisher search [<name or url>] [--select=<source>] [--quiet]\n" set option help
case h
printf "usage: fisher search [<plugins>] [--select=<source>] [--quiet]\n"
printf " [--or|--and] [--field=<field>] [--help]\n\n" printf " [--or|--and] [--field=<field>] [--help]\n\n"
printf " -s --select=<source> Select all, cache or remote plugins \n" printf " -s --select=<source> Select all, cache or remote plugins \n"
printf " -f --field=<field> Filter by name, url, info, tag or author \n" printf " -f --field=<field> Filter by name, url, info, tag or author \n"
printf " -a --and Join query with AND operator \n" printf " -o --or | -a --and Join query with AND/OR operator \n"
printf " -o --or Join query with OR operator \n"
printf " -q --quiet Enable quiet mode \n" printf " -q --quiet Enable quiet mode \n"
printf " -h --help Show usage help \n" printf " -h --help Show usage help \n"
return return
@ -93,6 +96,12 @@ function fisher_search -d "Search Fisherman Index"
end end
end end
switch "$option"
case help
fisher help search
return
end
if test -z "$fields[1]" if test -z "$fields[1]"
set fields '$0' set fields '$0'
end end
@ -112,16 +121,17 @@ function fisher_search -d "Search Fisherman Index"
end end
end end
if not test -s $index if test ! -s $index
printf "fisher: '%s' invalid path or url\n" $index >& 2 printf "fisher: '%s' invalid path or url\n" $index >& 2
return 1 return 1
end end
set -l cache (__fisher_list) set -l cache (__fisher_list)
awk -v FS='\n' -v RS='' -v cache_items="$cache" '
awk -v FS='\n' -v RS='' -v items="$cache" '
BEGIN { BEGIN {
split(cache_items, cache, " ") split(items, cache, " ")
} }
/^ *#/ { next } { /^ *#/ { next } {
@ -138,37 +148,47 @@ function fisher_search -d "Search Fisherman Index"
} }
} }
' $index | while read -l orphan ' $index | while read -l item
git -C $fisher_cache/$orphan ls-remote --get-url \
| read -l url set -l url
set -l info
set -l tags
set -l author
if test -e $fisher_cache/$item/.git
set tags custom
set url (git -C $fisher_cache/$item ls-remote --get-url)
printf "%s\n" $url \ set info (printf "%s\n" $url \
| sed -E ' | sed -E '
s|^https?://|| s|^https?://||
s|^github\.com|| s|^github\.com||
s|^bitbucket.org|bb:| s|^bitbucket.org|bb:|
s|^gitlab.com|gl:| s|^gitlab.com|gl:|
s|^/||' \ s|^/||')
| read -l info
git -C $fisher_cache/$orphan show -s --format='%ae;%an' ( set author (printf "%s\n" $url | sed 's|/[^/]*$||;s|.*/||')
git -C $fisher_cache/$orphan rev-list --max-parents=0 HEAD) \
| awk -v FS=';' '{ printf("%s\n", ($1 ? $1 : $2 ? $2 : "unknown")) }' \
| read -l author
set -l tags orphan for tag in theme plugin config
switch "$url"
for tag in theme plugin oh-my-fish config case \*$tag\*
if printf "%s\n" "$url" | grep -q $tag
switch "$tag"
case oh-my-fish
set tag omf
end
set tags $tag $tags set tags $tag $tags
end end
end end
else
set tags local
set url $fisher_cache/$item
if test -L $url
set url (readlink $url)
end
set author $USER
set info "$author/$item"
end
printf "\n%s\n%s\n%s\n%s\n%s\n\n" "$orphan" "$url" "$info" "$tags" "$author" printf "\n%s\n%s\n%s\n%s\n%s\n\n" "$item" "$url" "$info" "$tags" "$author"
end end
cat $index cat $index
@ -177,7 +197,7 @@ function fisher_search -d "Search Fisherman Index"
fisher_search --index=$index --and --name!=(__fisher_list) fisher_search --index=$index --and --name!=(__fisher_list)
case cache case cache
__fisher_list | read -laz cache set -l cache (__fisher_list)
if test -z "$cache" if test -z "$cache"
return 1 return 1

@ -1,24 +1,24 @@
function fisher_uninstall -d "Disable / Uninstall Plugins" function fisher_uninstall -d "Uninstall Plugins"
set -l option
set -l items
set -l error /dev/stderr set -l error /dev/stderr
set -l items
set -l option
getopts $argv | while read -l 1 2 getopts $argv | while read -l 1 2
switch "$1" switch "$1"
case _ case _
set items $items $2 set items $items $2
case a all
set option $option all
case f force case f force
set option $option force set option $option force
case q quiet case q quiet
set error /dev/null set error /dev/null
case help h case help
printf "usage: fisher uninstall [<name or url> ...] [--force] [--quiet] [--help]\n\n" set option help
case h
printf "usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]\n\n"
printf " -f --force Delete copy from cache \n" printf " -f --force Delete copy from cache \n"
printf " -q --quiet Enable quiet mode \n" printf " -q --quiet Enable quiet mode \n"
@ -27,32 +27,28 @@ function fisher_uninstall -d "Disable / Uninstall Plugins"
case \* case \*
printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2 printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2
fisher_uninstall --help >& 2 fisher_uninstall -h >& 2
return 1 return 1
end end
end end
switch "$option"
case help
fisher help uninstall
return
end
set -l time (date +%s)
set -l count 0 set -l count 0
set -l index 1 set -l index 1
set -l total (count $items) set -l total (count $items)
set -l elapsed (date +%s)
if set -q items[1] if set -q items[1]
printf "%s\n" $items printf "%s\n" $items
else else
__fisher_file - __fisher_file -
end | __fisher_validate | __fisher_cache | while read -l path
if not test -d "$path" end | __fisher_validate | __fisher_cache $error | while read -l path
switch "$path"
case file:///\*
set path (printf "%s\n" $path | sed 's|file://||')
case \*
printf "fisher: '%s' path not found\n" $path > $error
continue
end
end
set -l name (printf "%s\n" $path | __fisher_name) set -l name (printf "%s\n" $path | __fisher_name)
@ -63,9 +59,8 @@ function fisher_uninstall -d "Disable / Uninstall Plugins"
printf ">> %s\n" $name > $error printf ">> %s\n" $name > $error
case \* case \*
printf "(%s of %s) >> %s\n" (math 1 + $index) $total $name > $error
set index (math $index + 1) set index (math $index + 1)
printf "(%s of %s) >> %s\n" (math 1 + $index) $total $name > $error
end end
for file in $path/{*,functions{/*,/**/*}}.fish for file in $path/{*,functions{/*,/**/*}}.fish
@ -125,12 +120,12 @@ function fisher_uninstall -d "Disable / Uninstall Plugins"
mv -f $tmp $file mv -f $tmp $file
end end
set elapsed (math (date +%s) - $elapsed) set time (math (date +%s) - $time)
if test $count = 0 if test $count = 0
printf "No plugins were uninstalled.\n" > $error printf "No plugins were uninstalled.\n" > $error
return 1 return 1
end end
printf "Aye! %d plugin/s uninstalled in %0.fs\n" > $error $count $elapsed printf "Aye! %d plugin/s uninstalled in %0.fs\n" > $error $count $time
end end

@ -1,4 +1,4 @@
function fisher_update -d "Fisherman Update Manager" function fisher_update -d "Update Plugins and Fisherman"
set -l path set -l path
set -l items set -l items
set -l option self set -l option self
@ -20,8 +20,11 @@ function fisher_update -d "Fisherman Update Manager"
case q quiet case q quiet
set error $2 set error $2
case help h case help
printf "usage: fisher update [<name or url> ...] [--quiet] [--help]\n\n" set option help
case h
printf "usage: fisher update [<plugins>] [--quiet] [--help]\n\n"
printf " -q --quiet Enable quiet mode\n" printf " -q --quiet Enable quiet mode\n"
printf " -h --help Show usage help \n" printf " -h --help Show usage help \n"
@ -29,11 +32,17 @@ function fisher_update -d "Fisherman Update Manager"
case \* case \*
printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2 printf "fisher: Ahoy! '%s' is not a valid option\n" $1 >& 2
fisher_update --help >& 2 fisher_update -h >& 2
return 1 return 1
end end
end end
switch "$option"
case help
fisher help update
return
end
if test -z "$error" if test -z "$error"
set error /dev/null set error /dev/null
end end
@ -67,41 +76,30 @@ function fisher_update -d "Fisherman Update Manager"
rm -f $index rm -f $index
case self case self
set -l elapsed (date +%s) set -l time (date +%s)
printf "Updating >> Fisherman\n" > $error printf "Updating >> Fisherman\n" > $error
if not fisher_update --path=$fisher_home --quiet=$error if not fisher_update --path=$fisher_home --quiet=$error
printf "fisher: Could not update Fisherman.\n" > $error printf "fisher: Could not update Fisherman.\n" > $error
sed -E 's/.*(error:.*)/\1/' $fisher_error_log > $error sed -E 's/.*(error:.*)/\1/' $fisher_error_log > $error
return 1 return 1
end end
printf "Done without errors (%0.fs)\n" ( printf "Done without errors (%0.fs)\n" (math (date +%s) - $time) > $error
math (date +%s) - $elapsed) > $error
case \* case \*
set -l time (date +%s)
set -l count 0 set -l count 0
set -l index 1 set -l index 1
set -l total (count $items) set -l total (count $items)
set -l elapsed (date +%s)
if set -q items[1] if set -q items[1]
printf "%s\n" $items printf "%s\n" $items
else else
__fisher_file - __fisher_file -
end | __fisher_validate | __fisher_cache | while read -l path
if not test -d "$path" end | __fisher_validate | __fisher_cache $error | while read -l path
switch "$path"
case file:///\*
case \*
printf "fisher: '%s' path not found\n" $path > $error
continue
end
end
set -l name (printf "%s\n" $path | __fisher_name) set -l name (printf "%s\n" $path | __fisher_name)
@ -112,35 +110,30 @@ function fisher_update -d "Fisherman Update Manager"
printf ">> %s\n" $name > $error printf ">> %s\n" $name > $error
case \* case \*
printf "(%s of %s) >> %s\n" $index $total $name > $error
set index (math $index + 1) set index (math $index + 1)
printf "(%s of %s) >> %s\n" $index $total $name > $error
end end
switch "$path" if not fisher_update --path=$path --quiet
case file:///\* if test ! -L $path
case \*
if not test -L $path
if not fisher_update --path=$path --quiet=$error
sed -nE 's/.*(error|fatal): (.*)/error: \2/p sed -nE 's/.*(error|fatal): (.*)/error: \2/p
' $fisher_error_log > $error ' $fisher_error_log > $error
continue continue
end end
end end
end
fisher install --quiet -- (printf "%s\n" $name | __fisher_name) fisher install --quiet -- $name
set count (math $count + 1) set count (math $count + 1)
end end
set elapsed (math (date +%s) - $elapsed) set time (math (date +%s) - $time)
if test $count = 0 if test $count = 0
printf "No plugins were updated.\n" > $error printf "No plugins were updated.\n" > $error
return 1 return 1
end end
printf "Aye! %d plugin/s updated in %0.fs\n" > $error $count $elapsed printf "Aye! %d plugin/s updated in %0.fs\n" > $error $count $time
end end
end end

@ -1,4 +1,5 @@
function wait -d "Run commands and wait with a spin" function wait -d "Run commands and wait with a spin"
set -l option
set -l commands set -l commands
set -l spinners set -l spinners
set -l time 0.03 set -l time 0.03
@ -23,7 +24,10 @@ function wait -d "Run commands and wait with a spin"
case f format case f format
set format $2 set format $2
case h help case help
set option help
case h
printf "usage: wait <commands> [--spin=<style>] [--time=<delay>] [--log=<file>] \n" printf "usage: wait <commands> [--spin=<style>] [--time=<delay>] [--log=<file>] \n"
printf " [--format=<format>] [--help]\n\n" printf " [--format=<format>] [--help]\n\n"
@ -36,11 +40,17 @@ function wait -d "Run commands and wait with a spin"
case \* case \*
printf "wait: '%s' is not a valid option\n" $1 >& 2 printf "wait: '%s' is not a valid option\n" $1 >& 2
wait --help >& 2 wait -h >& 2
return 1 return 1
end end
end end
switch "$option"
case help
man wait
return
end
if not set -q commands[1] if not set -q commands[1]
return 1 return 1
end end

@ -4,7 +4,7 @@
.TH "FISHER\-HELP" "1" "January 2016" "" "fisherman" .TH "FISHER\-HELP" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\-help\fR \- Display Help Information \fBfisher\-help\fR \- Show Help
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
fisher \fBhelp\fR [\fIkeyword\fR] [\fB\-\-all\fR] [\fB\-\-guides\fR] [\fB\-\-usage\fR[=\fIcommand\fR]] [\fB\-\-help\fR] fisher \fBhelp\fR [\fIkeyword\fR] [\fB\-\-all\fR] [\fB\-\-guides\fR] [\fB\-\-usage\fR[=\fIcommand\fR]] [\fB\-\-help\fR]
@ -15,16 +15,18 @@ fisher \fBhelp\fR [\fIkeyword\fR] [\fB\-\-all\fR] [\fB\-\-guides\fR] [\fB\-\-usa
fisher \fBhelp\fR \fIcommand\fR fisher \fBhelp\fR \fIcommand\fR
. .
.br .br
fisher \fBhelp\fR \fIconcept\fR fisher \fBhelp\fR \fIguide\fR
. .
.br .br
fisher \fBhelp\fR \fB\-\-usage\fR=[\fIcommand\fR] fisher \fBhelp\fR \fB\-\-usage\fR=[\fIcommand\fR]
. .
.br
.
.SH "DESCRIPTION" .SH "DESCRIPTION"
Help displays \fIcommand\fR documentation, usage, guides and tutorials\. Help displays \fIcommand\fR documentation, usage, guides and tutorials\.
. .
.P .P
Help is based in \fBman\fR(1) pages\. To supply help with your own plugin or command, create one or more man\.\fB1~7\fR pages and add them to your project under the corresponding \fBman/man%\fR directory\. Help is based in \fBman(1)\fR pages\. To supply help with your own plugin or command, create one or more man\.1~7 pages and add them to your project under the corresponding man/man% directory\.
. .
.IP "" 4 .IP "" 4
. .
@ -41,37 +43,67 @@ my_plugin
.IP "" 0 .IP "" 0
. .
.P .P
This will allow you to invoke \fBman\fR my_plugin\. To add documentation to a command, prepend the keyword \fBfisher\-\fR to the man file, e\.g\., \fBfisher\-\fRmy\-command\.1\. This will allow you to access the man page via \fBfisher help my\-command\fR\. This will allow you to access help for my_plugin using \fBman(1)\fR\. To add documentation to a \fBfisher(1)\fR command, prepend the keyword \fBfisher\-\fR to the man file, e\.g\., \fBfisher\-\fRmy\-command\.1\. This will allow you to access the man page by \fBfisher help my\-command\fR\.
. .
.P .P
There are utilities that can help you generate man pages from other text formats, such as Markdown\. One example is \fBronn\fR(1)\. For a standalone example see \fBfisher help plugins\fR#{\fBExample\fR}\. There are utilities that can help you generate man pages from other text formats, such as Markdown\. One example is \fBronn(1)\fR\. For an example without using external utilities, see \fIExample\fR in \fBfisher help plugins\fR\.
. .
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-\-commands\fR[=\fIbare\fR] \fB\-a \-\-all\fR
List commands\. This is the default behavior of \fBfisher help\fR\. Use \fIbare\fR for easy to parse output\. List both commands and guides\. This shows all the available documentation\.
. .
.TP .TP
\fB\-a\fR \fB\-\-all\fR \fB\-g \-\-guides[=*bare*]\fR
List commands and guides\. Display all the available documentation\. List guides / tutorials\. Use \fIbare\fR to generate easy to parse output\.
. .
.TP .TP
\fB\-g\fR \fB\-\-guides\fR[=\fIbare\fR] \fB\-\-commands[=*bare*]\fR
List guides / tutorials\. Use \fIbare\fR for easy to parse output\. List commands\. This is the default behavior of \fBfisher help\fR\. Use \fIbare\fR to generate easy to parse output\.
. .
.TP .TP
\fB\-u\fR \fB\-\-usage\fR[=\fIcommand\fR] \fB\-u \-\-usage[=*command*]\fR
Display usage help for \fIcommand\fR\. To supply usage help with a command, \fIcommand\fR must accept a \fB\-\-help\fR option\. Display usage help for \fIcommand\fR\. To supply usage help with a command, \fIcommand\fR must implement a \fB\-h\fR flag\.
. .
.TP .TP
\fB\-h\fR \fB\-\-help\fR \fB\-h \-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
. .
.IP "\(bu" 4 .IP "\(bu" 4
Display usage help for all Fisherman commands\. Show all the available documentation\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher help \-a
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Show documentation about help\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher help help
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Show usage help for all Fisherman commands\.
. .
.IP "" 0 .IP "" 0
. .
@ -86,10 +118,10 @@ fisher help \-\-commands=bare | fisher help \-\-usage
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) man(1)
. .
.br .br
\fBfisher help plugins\fR#{\fBExample\fR} fisher(1)
. .
.br .br

@ -1,5 +1,5 @@
fisher-help(1) -- Display Help Information fisher-help(1) -- Show Help
========================================== ===========================
## SYNOPSIS ## SYNOPSIS
@ -8,14 +8,14 @@ fisher `help` [*keyword*] [`--all`] [`--guides`] [`--usage`[=*command*]] [`--hel
## USAGE ## USAGE
fisher `help` *command*<br> fisher `help` *command*<br>
fisher `help` *concept*<br> fisher `help` *guide*<br>
fisher `help` `--usage`=[*command*] fisher `help` `--usage`=[*command*]<br>
## DESCRIPTION ## DESCRIPTION
Help displays *command* documentation, usage, guides and tutorials. Help displays *command* documentation, usage, guides and tutorials.
Help is based in `man`(1) pages. To supply help with your own plugin or command, create one or more man.`1~7` pages and add them to your project under the corresponding `man/man%` directory. Help is based in `man(1)` pages. To supply help with your own plugin or command, create one or more man.1~7 pages and add them to your project under the corresponding man/man% directory.
``` ```
my_plugin my_plugin
@ -25,36 +25,49 @@ my_plugin
|-- my_plugin.1 |-- my_plugin.1
``` ```
This will allow you to invoke `man` my_plugin. To add documentation to a command, prepend the keyword `fisher-` to the man file, e.g., `fisher-`my-command.1. This will allow you to access the man page via `fisher help my-command`. This will allow you to access help for my_plugin using `man(1)`. To add documentation to a `fisher(1)` command, prepend the keyword `fisher-` to the man file, e.g., `fisher-`my-command.1. This will allow you to access the man page by `fisher help my-command`.
There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn`(1). For a standalone example see `fisher help plugins`#{`Example`}. There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn(1)`. For an example without using external utilities, see *Example* in `fisher help plugins`.
## OPTIONS ## OPTIONS
* `--commands`[=*bare*]: * `-a --all`:
List commands. This is the default behavior of `fisher help`. Use *bare* for easy to parse output. List both commands and guides. This shows all the available documentation.
* `-a` `--all`: * `-g --guides[=*bare*]`:
List commands and guides. Display all the available documentation. List guides / tutorials. Use *bare* to generate easy to parse output.
* `-g` `--guides`[=*bare*]: * `--commands[=*bare*]`:
List guides / tutorials. Use *bare* for easy to parse output. List commands. This is the default behavior of `fisher help`. Use *bare* to generate easy to parse output.
* `-u` `--usage`[=*command*]: * `-u --usage[=*command*]`:
Display usage help for *command*. To supply usage help with a command, *command* must accept a `--help` option. Display usage help for *command*. To supply usage help with a command, *command* must implement a `-h` flag.
* `-h` `--help`: * `-h --help`:
Show usage help. Show usage help.
## EXAMPLES ## EXAMPLES
* Display usage help for all Fisherman commands. * Show all the available documentation.
```
fisher help -a
```
* Show documentation about help.
```
fisher help help
```
* Show usage help for all Fisherman commands.
``` ```
fisher help --commands=bare | fisher help --usage fisher help --commands=bare | fisher help --usage
``` ```
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> man(1)<br>
`fisher help plugins`#{`Example`}<br> fisher(1)<br>

@ -4,39 +4,48 @@
.TH "FISHER\-INSTALL" "1" "January 2016" "" "fisherman" .TH "FISHER\-INSTALL" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\-install\fR \- Enable / Install plugins \fBfisher\-install\fR \- Install Plugins
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
fisher \fBinstall\fR [\fIname\fR, \fIurl\fR or \fIpath\fR \.\.\.] [\fB\-\-link\fR] [\fB\-\-quiet\fR] [\fB\-\-help\fR] fisher \fBinstall\fR [\fIplugins\fR \.\.\.] [\fB\-\-quiet\fR] [\fB\-\-help\fR]
. .
.SH "USAGE" .SH "USAGE"
fisher \fBinstall\fR \fIplugin\fR \.\.\. fisher \fBinstall\fR \fIname\fR
. .
.br .br
fisher \fBinstall\fR \fIowner/repo\fR \.\.\. fisher \fBinstall\fR \fIURL\fR
. .
.br .br
fisher \fBinstall\fR \fIpath\fR \.\.\. fisher \fBinstall\fR \fIpath\fR
.
.br
fisher \fBinstall\fR \fIowner/repo\fR
. .
.br .br
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Install one or \fImore\fR plugins by \fIname\fR, searching \fB$fisher_index\fR or by \fIurl\fR\. If no arguments are given, read the standard input\. Install one or more plugins, by name, URL or local path\. If no arguments are given, read the standard input\.
. .
.P .P
If the domain or host is not provided, Fisherman will use any value in \fB$fisher_default_host\fR\. The default value is \fBhttps://github\.com\fR\. If the Git host is not provided, Fisherman will use any value available in \fB$fisher_default_host\fR or https://github\.com by default\.
. .
.P .P
In addition, all of the following variations are accepted: In addition, all of the following \fBowner/repo\fR variations are accepted:
.
.IP "\(bu" 4
owner/repo \fB>\fR https://github\.com/owner/repo
.
.br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgithub\fR/owner/repo \fB\->\fR https://github\.com/owner/repo \fIgithub\fR/owner/repo \fB>\fR https://github\.com/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgh\fRowner/repo \fB\->\fR https://github\.com/owner/repo \fIgh\fR/owner/repo \fB>\fR https://github\.com/owner/repo
. .
.br .br
@ -44,22 +53,22 @@ In addition, all of the following variations are accepted:
.IP "" 0 .IP "" 0
. .
.P .P
Shortcuts for other common Git repository hosting services are also available: Shortcuts to other common Git repository hosting services are also available:
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBbb\fR/owner/repo \fB\->\fR https://bitbucket\.org/owner/repo \fIbb\fR/owner/repo \fB>\fR https://bitbucket\.org/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgl\fR/owner/repo \fB\->\fR https://gitlab\.com/owner/repo \fIgl\fR/owner/repo \fB>\fR https://gitlab\.com/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBomf\fR/owner/repo \fB\->\fR https://github\.com/oh\-my\-fish/repo \fIomf\fR/owner/repo \fB>\fR https://github\.com/oh\-my\-fish/repo
. .
.br .br
@ -67,24 +76,20 @@ Shortcuts for other common Git repository hosting services are also available:
.IP "" 0 .IP "" 0
. .
.P .P
If a copy of the plugin already exists in \fB$fisher_cache\fR, only the relevant files are copied to \fB$fisher_config\fR/functions, otherwise the plugin repository is first downloaded\. If you wish to update a plugin, use \fBfisher update\fR \fIplugin\fR instead\. If a URL is given, the repository is cloned to \fB$fisher_cache\fR the first time and any relevant plugin files are copied to \fB$fisher_config\fR functions, completions, conf\.d and man directories\.
. .
.P .P
If a local path is given, copy the directory to the cache\. If the plugin already exists in \fB$fisher_cache\fR, the files are copied to \fB$fisher_config\fR\. To update a plugin use \fBfisher update\fR\.
. .
.P .P
If the plugin declares dependencies, these will be installed as well\. If any dependencies are already installed they will not be updated in order to prevent version issues\. See \fBfisher help fishfile\fR#{\fBPlugins\fR}\. If the plugin declares dependencies, these will be installed too\. If any of the dependencies are already enabled or downloaded to the cache, they will not be updated to prevent version issues\. See \fIPlugins\fR in \fBfisher help fishfile\fR\.
. .
.P .P
If a plugin includes either a fish_prompt\.fish or fish_right_prompt\.fish, both files are first removed from \fB$fisher_config\fR/functions and then the new ones are copied\. If a plugin includes either a fish_prompt\.fish or fish_right_prompt\.fish, both files are first removed from \fB$fisher_config/functions\fR and then the new ones are copied\.
. .
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-s\fR \fB\-\-link\fR
Create a symbolic link to the plugin repository in the cache or to the original source directory if a local path is given\.
.
.TP
\fB\-q\fR \fB\-\-quiet\fR \fB\-q\fR \fB\-\-quiet\fR
Enable quiet mode\. Enable quiet mode\.
. .
@ -92,98 +97,94 @@ Enable quiet mode\.
\fB\-h\fR \fB\-\-help\fR \fB\-h\fR \fB\-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "PROCESS" .SH "INSTALL PROCESS"
Here is a typical install process breakdown for \fIplugin\fR: Here is the typical install process breakdown for \fIplugin\fR:
. .
.IP "1." 4 .IP "1." 4
Check if \fIplugin\fR exists in \fB$fisher_index\fR\. Fail otherwise\. Check if \fIplugin\fR exists in \fB$fisher_index\fR\. Fail otherwise\.
. .
.IP "2." 4 .IP "2." 4
Download \fIplugin\fR to \fB$fisher_cache\fR if it is not there already\. Download \fIplugin\fR to \fB$fisher_cache\fR if not there already\.
. .
.IP "3." 4 .IP "3." 4
Copy all \fB*\.fish\fR and functions/\fB*\.fish\fR files to \fB$fisher_config\fR/functions\. Copy all \fB*\.fish\fR and \fBfunctions/*\.fish\fR files to \fB$fisher_config/functions\fR\.
. .
.IP "4." 4 .IP "4." 4
Copy all completions/\fB*\.fish\fR to \fB$fisher_config\fR/completions\. Copy all \fBcompletions/*\.fish\fR to \fB$fisher_config/completions\fR\.
. .
.IP "5." 4 .IP "5." 4
Copy all man/man[\fB1\-7\fR] to \fB$fisher_config\fR/man/man\fB%\fR Copy all \fBinit\.fish\fR and \fB*\.config\.fish\fR files to \fB$fisher_config/conf\.d\fR\.
.
.IP "6." 4
Copy all man/man% to \fB$fisher_config/man/man%\fR\.
. .
.IP "" 0 .IP "" 0
. .
.P .SH "EXAMPLES"
Here is the \fIplugin\fR tree inside the cache: Here is the directory tree of \fImy_plugin\fR somewhere deep under the sea:
. .
.P .IP "" 4
\fB$fisher_cache\fR/\fIplugin\fR
. .
.br .nf
my_plugin
|\-\- README\.md |\-\- README\.md
. |\-\- my_plugin\.fish
.br
|\-\- \fIplugin\fR\.fish
.
.br
|\-\- functions |\-\- functions
. | |\-\- my_plugin_helper\.fish
.br
| |\-\- plugin_helper\.fish
.
.br
|\-\- completions |\-\- completions
. | |\-\- my_plugin\.fish
.br
| |\-\- \fIplugin\fR\.fish
.
.br
|\-\- test |\-\- test
. | |\-\- my_plugin\.fish
.br
| |\-\- \fIplugin\fR\.fish
.
.br
|\-\- man |\-\- man
.
.br
|\-\- man1 |\-\- man1
|\-\- my_plugin\.1
. .
.br .fi
|\-\- \fIplugin\fR\.1
. .
.br .IP "" 0
. .
.P .P
And this is how the files are copied from \fB$fisher_cache\fR/plugin to \fB$fisher_config\fR: And here is the directory tree of \fB$fisher_config/\fR after running \fBfisher install my_plugin\fR:
.
.IP "1." 4
\fIplugin\fR\.fish \fB\->\fR $fisher_config/functions
. .
.IP "2." 4 .IP "" 4
functions/plugin_helper\.fish \fB\->\fR $fisher_config/functions
. .
.IP "3." 4 .nf
completions/\fIplugin\fR\.fish \fB\->\fR $fisher_config/completions
$fisher_config
|\-\- functions
|\-\- my_plugin\.fish
|\-\- my_plugin_helper\.fish
|\-\- completions
|\-\- my_plugin\.fish
|\-\- man
|\-\- man1
|\-\- my_plugin\.1
|\-\- cache
|\-\- my_other_plugin
|\-\- my_plugin/\.\.\.
. .
.IP "4." 4 .fi
man/man1/\fIplugin\fR\.1 \fB\->\fR $fisher_config/man/man1
. .
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .P
\fBfisher\fR(1) In addition, any \fBinit\.fish\fR or \fB*\.config\.fish\fR files, are copied to \fB$fisher_config/conf\.d\fR and evaluated during the start of the shell\.
. .
.br .P
\fBfisher help config\fR Notes: \fBinit\.fish\fR files are renamed to \fBmy_plugin\.init\.fish\fR to prevent name collisions\.
.
.SH "SEE ALSO"
fisher(1)
. .
.br .br
\fBfisher help update\fR fisher help config
. .
.br .br
\fBfisher help uninstall\fR fisher help update
. .
.br .br
\fBfisher help fishfile\fR#{\fBPlugins\fR} fisher help uninstall
. .
.br .br

@ -1,90 +1,105 @@
fisher-install(1) -- Enable / Install plugins fisher-install(1) -- Install Plugins
============================================= ====================================
## SYNOPSIS ## SYNOPSIS
fisher `install` [*name*, *url* or *path* ...] [`--link`] [`--quiet`] [`--help`] fisher `install` [*plugins* ...] [`--quiet`] [`--help`]
## USAGE ## USAGE
fisher `install` *plugin* ...<br> fisher `install` *name*<br>
fisher `install` *owner/repo* ...<br> fisher `install` *URL*<br>
fisher `install` *path* ...<br> fisher `install` *path*<br>
fisher `install` *owner/repo*<br>
## DESCRIPTION ## DESCRIPTION
Install one or *more* plugins by *name*, searching `$fisher_index` or by *url*. If no arguments are given, read the standard input. Install one or more plugins, by name, URL or local path. If no arguments are given, read the standard input.
If the domain or host is not provided, Fisherman will use any value in `$fisher_default_host`. The default value is `https://github.com`. If the Git host is not provided, Fisherman will use any value available in `$fisher_default_host` or https://github.com by default.
In addition, all of the following variations are accepted: In addition, all of the following `owner/repo` variations are accepted:
* `github`/owner/repo `->` https://github.com/owner/repo<br> * owner/repo `>` https://github.com/owner/repo<br>
* `gh`owner/repo `->` https://github.com/owner/repo<br> * *github*/owner/repo `>` https://github.com/owner/repo<br>
* *gh*/owner/repo `>` https://github.com/owner/repo<br>
Shortcuts for other common Git repository hosting services are also available: Shortcuts to other common Git repository hosting services are also available:
* `bb`/owner/repo `->` https://bitbucket.org/owner/repo<br> * *bb*/owner/repo `>` https://bitbucket.org/owner/repo<br>
* `gl`/owner/repo `->` https://gitlab.com/owner/repo<br> * *gl*/owner/repo `>` https://gitlab.com/owner/repo<br>
* `omf`/owner/repo `->` https://github.com/oh-my-fish/repo<br> * *omf*/owner/repo `>` https://github.com/oh-my-fish/repo<br>
If a copy of the plugin already exists in `$fisher_cache`, only the relevant files are copied to `$fisher_config`/functions, otherwise the plugin repository is first downloaded. If you wish to update a plugin, use `fisher update` *plugin* instead. If a URL is given, the repository is cloned to `$fisher_cache` the first time and any relevant plugin files are copied to `$fisher_config` functions, completions, conf.d and man directories.
If a local path is given, copy the directory to the cache. If the plugin already exists in `$fisher_cache`, the files are copied to `$fisher_config`. To update a plugin use `fisher update`.
If the plugin declares dependencies, these will be installed as well. If any dependencies are already installed they will not be updated in order to prevent version issues. See `fisher help fishfile`#{`Plugins`}. If the plugin declares dependencies, these will be installed too. If any of the dependencies are already enabled or downloaded to the cache, they will not be updated to prevent version issues. See *Plugins* in `fisher help fishfile`.
If a plugin includes either a fish_prompt.fish or fish_right_prompt.fish, both files are first removed from `$fisher_config`/functions and then the new ones are copied. If a plugin includes either a fish_prompt.fish or fish_right_prompt.fish, both files are first removed from `$fisher_config/functions` and then the new ones are copied.
## OPTIONS ## OPTIONS
* `-s` `--link`:
Create a symbolic link to the plugin repository in the cache or to the original source directory if a local path is given.
* `-q` `--quiet`: * `-q` `--quiet`:
Enable quiet mode. Enable quiet mode.
* `-h` `--help`: * `-h` `--help`:
Show usage help. Show usage help.
## PROCESS ## INSTALL PROCESS
Here is a typical install process breakdown for *plugin*: Here is the typical install process breakdown for *plugin*:
1. Check if *plugin* exists in `$fisher_index`. Fail otherwise. 1. Check if *plugin* exists in `$fisher_index`. Fail otherwise.
2. Download *plugin* to `$fisher_cache` if it is not there already. 2. Download *plugin* to `$fisher_cache` if not there already.
3. Copy all `*.fish` and functions/`*.fish` files to `$fisher_config`/functions. 3. Copy all `*.fish` and `functions/*.fish` files to `$fisher_config/functions`.
4. Copy all completions/`*.fish` to `$fisher_config`/completions. 4. Copy all `completions/*.fish` to `$fisher_config/completions`.
5. Copy all man/man[`1-7`] to `$fisher_config`/man/man`%` 5. Copy all `init.fish` and `*.config.fish` files to `$fisher_config/conf.d`.
5. Copy all man/man% to `$fisher_config/man/man%`.
Here is the *plugin* tree inside the cache:
## EXAMPLES
`$fisher_cache`/*plugin*<br> Here is the directory tree of *my_plugin* somewhere deep under the sea:
|-- README.md<br>
|-- *plugin*.fish<br> ```
|-- functions<br> my_plugin
| |-- plugin_helper.fish<br> |-- README.md
|-- completions<br> |-- my_plugin.fish
| |-- *plugin*.fish<br> |-- functions
|-- test<br> | |-- my_plugin_helper.fish
| |-- *plugin*.fish<br> |-- completions
|-- man<br> | |-- my_plugin.fish
|-- man1<br> |-- test
|-- *plugin*.1<br> | |-- my_plugin.fish
|-- man
|-- man1
And this is how the files are copied from `$fisher_cache`/plugin to `$fisher_config`: |-- my_plugin.1
```
1. *plugin*.fish `->` $fisher_config/functions
2. functions/plugin_helper.fish `->` $fisher_config/functions And here is the directory tree of `$fisher_config/` after running `fisher install my_plugin`:
3. completions/*plugin*.fish `->` $fisher_config/completions
4. man/man1/*plugin*.1 `->` $fisher_config/man/man1 ```
$fisher_config
|-- functions
|-- my_plugin.fish
|-- my_plugin_helper.fish
|-- completions
|-- my_plugin.fish
|-- man
|-- man1
|-- my_plugin.1
|-- cache
|-- my_other_plugin
|-- my_plugin/...
```
In addition, any `init.fish` or `*.config.fish` files, are copied to `$fisher_config/conf.d` and evaluated during the start of the shell.
Notes: `init.fish` files are renamed to `my_plugin.init.fish` to prevent name collisions.
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher help config`<br> fisher help config<br>
`fisher help update`<br> fisher help update<br>
`fisher help uninstall`<br> fisher help uninstall<br>
`fisher help fishfile`#{`Plugins`}<br>

@ -4,10 +4,10 @@
.TH "FISHER\-SEARCH" "1" "January 2016" "" "fisherman" .TH "FISHER\-SEARCH" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\-search\fR \- Search Fisherman Index \fBfisher\-search\fR \- Search Plugin Index
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
fisher \fBsearch\fR [\fIname\fR or \fIurl\fR] fisher \fBsearch\fR [\fIplugins\fR \.\.\.]
. .
.br .br
fisher \fBsearch\fR [\fB\-\-select\fR=\fIall\fR|\fIcache\fR|\fIremote\fR] fisher \fBsearch\fR [\fB\-\-select\fR=\fIall\fR|\fIcache\fR|\fIremote\fR]
@ -16,7 +16,7 @@ fisher \fBsearch\fR [\fB\-\-select\fR=\fIall\fR|\fIcache\fR|\fIremote\fR]
fisher \fBsearch\fR [\fB\-\-field\fR=\fIname\fR|\fIurl\fR|\fIinfo\fR|\fItag\fR|\fIauthor\fR] fisher \fBsearch\fR [\fB\-\-field\fR=\fIname\fR|\fIurl\fR|\fIinfo\fR|\fItag\fR|\fIauthor\fR]
. .
.br .br
fisher \fBsearch\fR [\fB\-\-\fR\fIfield\fR=\fImatch\fR] fisher \fBsearch\fR [\fB\-\-\fR\fIfield[\fR=\fImatch\fR]]
. .
.br .br
fisher \fBsearch\fR [\fB\-\-\fR\fIfield\fR~\fB/\fR\fIregex\fR\fB/\fR] fisher \fBsearch\fR [\fB\-\-\fR\fIfield\fR~\fB/\fR\fIregex\fR\fB/\fR]
@ -36,28 +36,27 @@ fisher \fBsearch\fR \fIplugin\fR
fisher \fBsearch\fR \fIowner/repo\fR fisher \fBsearch\fR \fIowner/repo\fR
. .
.br .br
fisher \fBsearch\fR \-\-field=\fIname\fR \-\-select=all | column
.
.br
fisher \fBsearch\fR \-\-tag=tag1 \-\-and \-\-tag=tag2
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Search the Fisherman index database\. You can use a custom index file by setting \fB$fisher_index\fR to your preferred url or file\. See \fBfisher help config\fR and \fBfisher\fR(7)#{\fBIndex\fR}\. Search the Fisherman index database\. You can use a custom index file by setting \fB$fisher_index\fR to your preferred URL or file\. See \fBfisher help config\fR and \fIIndex\fR in \fBfisher(7)\fR\.
. .
.P .P
A copy of the index is downloaded each time a search query happens, keeping the index up to date all the time\. A copy of the index is downloaded every time a search query happens, keeping the index up to date all the time\.
. .
.P .P
The index file consists of records separated by blank lines \fB\'\en\en\'\fR and each record consists of fields separated by a single line \fB\'\en\'\fR\. The index file consists of records separated by blank lines \fB\'\en\en\'\fR and each record consists of fields separated by a single line \fB\'\en\'\fR\.
. .
.P
For example:
.
.IP "" 4 .IP "" 4
. .
.nf .nf
name name
url url
info | description info
tag1 tag2 \.\.\. tag1 tag2 tag3 \.\.\.
author author
. .
.fi .fi
@ -65,69 +64,57 @@ author
.IP "" 0 .IP "" 0
. .
.P .P
See #{\fBOutput\fR} for more information\. See \fIOutput\fR for more information\.
. .
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-s\fR \fB\-\-select\fR[=\fIall\fR|\fIcache\fR|\fIremote\fR] \fB\-s \-\-select[=all|cache|remote]\fR
Select the record source\. \-\-select=\fIcache\fR queries only local plugins, i\.e\., those inside \fB$fisher_cache\fR\. \-\-select=\fIremote\fR queries all plugins not in the cache, i\.e, those available to install\. \-\-select=\fIall\fR queries everything\. Select the record source\. \-\-select=\fIcache\fR queries only local plugins, i\.e\., those inside \fB$fisher_cache\fR\. \-\-select=\fIremote\fR queries all plugins not in the cache, i\.e, those available to install\. \-\-select=\fIall\fR queries everything\.
. .
.TP .TP
\fB\-f\fR \fB\-\-field\fR=\fIname\fR|\fIurl\fR|\fIinfo\fR|\fItag\fR|\fIauthor\fR \fB\-f \-\-field=name|url|info|tag|author\fR
Display only the given fields from the selected records\. Use \-\-\fIfield\fR instead as a shortcut for \fB\-\-field\fR=name\. Display only the given fields from the selected records\. Use \-\-\fIfield\fR as a shortcut for \-\-field=\fIfield\fR\. For example \fBfisher search \-\-url\fR will display only the URLs for
. .
.TP .TP
\-\-\fIfield\fR[=\fImatch\fR] \fB\-\-field[=match]\fR
Filter the result set by \fIfield\fR=\fImatch\fR, where \fIfield\fR can be one or more of \fBname\fR, \fBurl\fR, \fBinfo\fR, \fBtag\fR or \fBauthor\fR\. If \fImatch\fR is not given, this is equivalent to \fB\-\-select\fR=\fIfield\fR\. Use \fB!=\fR to negate the query\. Filter the result set by \fIfield\fR=\fImatch\fR, where \fIfield\fR can be one or more of \fBname\fR, \fBurl\fR, \fBinfo\fR, \fBtag\fR or \fBauthor\fR\. If \fImatch\fR is not given, this is equivalent to \-\-select=\fIfield\fR\. Use \fB!=\fR to negate the query\.
. .
.TP .TP
\-\-\fIfield\fR[~\fB/\fR\fIregex\fR\fB/\fR] \fB\-\-field[~/regex/]\fR
Essentially the same as \-\-\fIfield\fR=\fImatch\fR, but with Regular Expression support\. \-\-\fIfield\fR~\fB/\fR\fIregex\fR\fB/\fR filters the result set using the given \fB/\fR\fIregex\fR\fB/\fR\. For example, \-\-name=\fB/\fR^\fImatch\fR$\fB/\fR is the same as \-\-\fIfield\fR=\fImatch\fR and \-\-url~\fB/\fRoh\-my\-fish\fB/\fR selects only oh-my-fish plugins\. Use \fB!~\fR to negate the query\. Essentially the same as \-\-\fIfield\fR=\fImatch\fR, but with Regular Expression support\. \-\-\fIfield\fR~/\fIregex\fR/ filters the result set using the given /\fIregex\fR/\. For example, \-\-name=/^\fImatch\fR$/ is the same as \-\-\fIfield\fR=\fImatch\fR and \-\-url~/oh\-my\-fish/ selects only oh\-my\-fish plugins\. Use \fB!~\fR to negate the query\.
. .
.TP .TP
\fB\-a\fR \fB\-\-and\fR \fB\-a \-\-and\fR
Join query with a logical AND operator\. Join query with the logical AND operator\.
. .
.TP .TP
\fB\-o\fR \fB\-\-or\fR \fB\-o \-\-or\fR
Join query with a logical OR operator\. This the default operator for each query operation\. Join query with the logical OR operator\. This the default operator for each query\.
. .
.TP .TP
\fB\-Q\fR \fB\-\-query\fR=\fIfield\fR[\fB&&\fR,\fB||\fR]\fIfield\fR\.\.\. \fB\-Q \-\-query=field[&&,||]field\.\.\.\fR
Use a custom search expression\. For example, \-\-query=\'name~\fB/\fR[0\-9]\fB/\fR||name~\fB/\fR^[xyz]\fB/\fR\' selects all plugins that contain numbers in their name \fIor\fR begin with the characters \fIx\fR, \fIy\fR or \fIz\fR\. Use a custom search expression\. For example, \fB\-\-query=name~/[0\-9]/||name~/^[xyz]/\fR selects all plugins that contain numbers in their name \fIor\fR begin with the characters \fIx\fR, \fIy\fR or \fIz\fR\.
. .
.TP .TP
\fB\-q\fR \fB\-\-quiet\fR \fB\-q \-\-quiet\fR
Enable quiet mode\. Enable quiet mode\.
. .
.TP .TP
\fB\-h\fR \fB\-\-search\fR \fB\-h \-\-search\fR
Show usage search\. Show help\.
. .
.SH "OUTPUT" .SH "OUTPUT"
The default behavior is to print the result set to standard output in its original format\. The default behavior is to print the result set to standard output in their original format\.
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
fisher search shark fisher search shark
.
.fi
.
.IP "" 0
.
.P
\fB\.\.\.\fR
.
.IP "" 4
.
.nf
shark shark
https://github\.com/bucaran/shark https://github\.com/bucaran/shark
Sparklines for your Fish Sparkline Generator
chart tool chart tool
bucaran bucaran
. .
@ -136,24 +123,13 @@ bucaran
.IP "" 0 .IP "" 0
. .
.P .P
Search is optimized for parsing when using filters: \fB\-\-name\fR, \fB\-\-url\fR, \fB\-\-info\fR, \fB\-\-tags\fR, \fB\-\-author\fR or \fB\-\-field\fR=\fIname\fR|\fIurl\fR|\fIinfo\fR|\fItag\fR|\fIauthor\fR\. Search is optimized for parsing when using the filters: \fB\-\-name\fR, \fB\-\-url\fR, \fB\-\-info\fR, \fB\-\-tags\fR, \fB\-\-author\fR or \fB\-\-field=name|url|info|tag|author\fR\.
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
fisher search shark \-\-name \-\-url fisher search shark \-\-name \-\-url
.
.fi
.
.IP "" 0
.
.P
\fB\.\.\.\fR
.
.IP "" 4
.
.nf
shark;https://github\.com/bucaran/shark shark;https://github\.com/bucaran/shark
. .
@ -162,7 +138,7 @@ shark;https://github\.com/bucaran/shark
.IP "" 0 .IP "" 0
. .
.P .P
The result set above consists of single line \fB\'\en\'\fR separated records where each record consists of one or more of the given fields separated by a semicolon \fB\';\'\fR\. The result set above consists of single line \fB\'\en\'\fR separated records, and each record consists of one or more of the given fields separated by a semicolon \fB\';\'\fR\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
. .
@ -182,7 +158,7 @@ fisher search \-\-name | column
.IP "" 0 .IP "" 0
. .
.IP "\(bu" 4 .IP "\(bu" 4
Display all plugins by url, sans \fIhttps://github\.com/\fR and format into multiple columns\. Display all plugins by URL, sans \fIhttps://github\.com/\fR and format into multiple columns\.
. .
.IP "" 0 .IP "" 0
. .
@ -242,13 +218,10 @@ fisher search \-\-select=cache \-\-name~/^[^s]/
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) fisher(1)
.
.br
\fBfisher\fR(7){\fBIndex\fR}
. .
.br .br
\fBfisher help plugins\fR fisher help plugins
. .
.br .br

@ -1,12 +1,12 @@
fisher-search(1) -- Search Fisherman Index fisher-search(1) -- Search Plugin Index
========================================== ==========================================
## SYNOPSIS ## SYNOPSIS
fisher `search` [*name* or *url*]<br> fisher `search` [*plugins* ...]<br>
fisher `search` [`--select`=*all*|*cache*|*remote*]<br> fisher `search` [`--select`=*all*|*cache*|*remote*]<br>
fisher `search` [`--field`=*name*|*url*|*info*|*tag*|*author*]<br> fisher `search` [`--field`=*name*|*url*|*info*|*tag*|*author*]<br>
fisher `search` [`--`*field*=*match*] <br> fisher `search` [`--`*field[*=*match*]] <br>
fisher `search` [`--`*field*~`/`*regex*`/`] <br> fisher `search` [`--`*field*~`/`*regex*`/`] <br>
fisher `search` [`--query`=*field*[`&&`,`||`]*field*...]<br> fisher `search` [`--query`=*field*[`&&`,`||`]*field*...]<br>
fisher `search` [`--and`] [`--or`] [`--quiet`] [`--help`]<br> fisher `search` [`--and`] [`--or`] [`--quiet`] [`--help`]<br>
@ -15,87 +15,78 @@ fisher `search` [`--and`] [`--or`] [`--quiet`] [`--help`]<br>
fisher `search` *plugin*<br> fisher `search` *plugin*<br>
fisher `search` *owner/repo*<br> fisher `search` *owner/repo*<br>
fisher `search` --field=*name* --select=all | column<br>
fisher `search` --tag=tag1 --and --tag=tag2
## DESCRIPTION ## DESCRIPTION
Search the Fisherman index database. You can use a custom index file by setting `$fisher_index` to your preferred url or file. See `fisher help config` and `fisher`(7)#{`Index`}. Search the Fisherman index database. You can use a custom index file by setting `$fisher_index` to your preferred URL or file. See `fisher help config` and *Index* in `fisher(7)`.
A copy of the index is downloaded each time a search query happens, keeping the index up to date all the time. A copy of the index is downloaded every time a search query happens, keeping the index up to date all the time.
The index file consists of records separated by blank lines `'\n\n'` and each record consists of fields separated by a single line `'\n'`. The index file consists of records separated by blank lines `'\n\n'` and each record consists of fields separated by a single line `'\n'`.
For example:
``` ```
name name
url url
info | description info
tag1 tag2 ... tag1 tag2 tag3 ...
author author
``` ```
See #{`Output`} for more information. See *Output* for more information.
## OPTIONS ## OPTIONS
* `-s` `--select`[=*all*|*cache*|*remote*]: * `-s --select[=all|cache|remote]`:
Select the record source. --select=*cache* queries only local plugins, i.e., those inside `$fisher_cache`. --select=*remote* queries all plugins not in the cache, i.e, those available to install. --select=*all* queries everything. Select the record source. --select=*cache* queries only local plugins, i.e., those inside `$fisher_cache`. --select=*remote* queries all plugins not in the cache, i.e, those available to install. --select=*all* queries everything.
* `-f` `--field`=*name*|*url*|*info*|*tag*|*author*: * `-f --field=name|url|info|tag|author`:
Display only the given fields from the selected records. Use --*field* instead as a shortcut for `--field`=name. Display only the given fields from the selected records. Use --*field* as a shortcut for --field=*field*. For example `fisher search --url` will display only the URLs for
* --*field*[=*match*]: * `--field[=match]`:
Filter the result set by *field*=*match*, where *field* can be one or more of `name`, `url`, `info`, `tag` or `author`. If *match* is not given, this is equivalent to `--select`=*field*. Use `!=` to negate the query. Filter the result set by *field*=*match*, where *field* can be one or more of `name`, `url`, `info`, `tag` or `author`. If *match* is not given, this is equivalent to --select=*field*. Use `!=` to negate the query.
* --*field*[~`/`*regex*`/`]: * `--field[~/regex/]`:
Essentially the same as --*field*=*match*, but with Regular Expression support. --*field*~`/`*regex*`/` filters the result set using the given `/`*regex*`/`. For example, --name=`/`^*match*$`/` is the same as --*field*=*match* and --url~`/`oh-my-fish`/` selects only oh-my-fish plugins. Use `!~` to negate the query. Essentially the same as --*field*=*match*, but with Regular Expression support. --*field*~/*regex*/ filters the result set using the given /*regex*/. For example, --name=/^*match*$/ is the same as --*field*=*match* and --url~/oh-my-fish/ selects only oh-my-fish plugins. Use `!~` to negate the query.
* `-a` `--and`: * `-a --and`:
Join query with a logical AND operator. Join query with the logical AND operator.
* `-o` `--or`: * `-o --or`:
Join query with a logical OR operator. This the default operator for each query operation. Join query with the logical OR operator. This the default operator for each query.
* `-Q` `--query`=*field*[`&&`,`||`]*field*...: * `-Q --query=field[&&,||]field...`:
Use a custom search expression. For example, --query='name~`/`[0-9]`/`||name~`/`^[xyz]`/`' selects all plugins that contain numbers in their name *or* begin with the characters *x*, *y* or *z*. Use a custom search expression. For example, `--query=name~/[0-9]/||name~/^[xyz]/` selects all plugins that contain numbers in their name *or* begin with the characters *x*, *y* or *z*.
* `-q` `--quiet`: * `-q --quiet`:
Enable quiet mode. Enable quiet mode.
* `-h` `--search`: * `-h --search`:
Show usage search. Show help.
## OUTPUT ## OUTPUT
The default behavior is to print the result set to standard output in its original format. The default behavior is to print the result set to standard output in their original format.
``` ```
fisher search shark fisher search shark
```
`...`
```
shark shark
https://github.com/bucaran/shark https://github.com/bucaran/shark
Sparklines for your Fish Sparkline Generator
chart tool chart tool
bucaran bucaran
``` ```
Search is optimized for parsing when using filters: `--name`, `--url`, `--info`, `--tags`, `--author` or `--field`=*name*|*url*|*info*|*tag*|*author*. Search is optimized for parsing when using the filters: `--name`, `--url`, `--info`, `--tags`, `--author` or `--field=name|url|info|tag|author`.
``` ```
fisher search shark --name --url fisher search shark --name --url
```
`...`
```
shark;https://github.com/bucaran/shark shark;https://github.com/bucaran/shark
``` ```
The result set above consists of single line `'\n'` separated records where each record consists of one or more of the given fields separated by a semicolon `';'`. The result set above consists of single line `'\n'` separated records, and each record consists of one or more of the given fields separated by a semicolon `';'`.
## EXAMPLES ## EXAMPLES
@ -105,7 +96,7 @@ The result set above consists of single line `'\n'` separated records where each
fisher search --name | column fisher search --name | column
``` ```
* Display all plugins by url, sans *https://github.com/* and format into multiple columns. * Display all plugins by URL, sans *https://github.com/* and format into multiple columns.
``` ```
fisher search --field=url --select=all | sed 's|https://github.com/||' | column fisher search --field=url --select=all | sed 's|https://github.com/||' | column
@ -131,6 +122,5 @@ fisher search --select=cache --name~/^[^s]/
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher`(7){`Index`}<br> fisher help plugins<br>
`fisher help plugins`<br>

@ -4,10 +4,10 @@
.TH "FISHER\-UNINSTALL" "1" "January 2016" "" "fisherman" .TH "FISHER\-UNINSTALL" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\-uninstall\fR \- Disable / Uninstall Plugins \fBfisher\-uninstall\fR \- Uninstall Plugins
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
fisher \fBuninstall\fR [\fIname\fR, \fIurl\fR or \fIpath\fR \.\.\.] fisher \fBuninstall\fR [\fIplugins\fR \.\.\.]
. .
.br .br
fisher \fBuninstall\fR [\fB\-\-force\fR] [\fB\-\-quiet\fR] [\fB\-\-help\fR] fisher \fBuninstall\fR [\fB\-\-force\fR] [\fB\-\-quiet\fR] [\fB\-\-help\fR]
@ -15,37 +15,37 @@ fisher \fBuninstall\fR [\fB\-\-force\fR] [\fB\-\-quiet\fR] [\fB\-\-help\fR]
.br .br
. .
.SH "USAGE" .SH "USAGE"
fisher \fBuninstall\fR \fIplugin\fR \.\.\. fisher \fBuninstall\fR \fIplugin\fR
. .
.br .br
fisher \fBuninstall\fR \fIowner/repo\fR \.\.\. fisher \fBuninstall\fR \fIowner/repo\fR
. .
.br .br
fisher \fBuninstall\fR \fIpath\fR \.\.\. fisher \fBuninstall\fR \fIpath\fR
. .
.br .br
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Uninstall one or \fImore\fR plugins by \fIname\fR, searching \fB$fisher_index\fR or by \fIurl\fR\. If no arguments are given, read the standard input\. This process is the inverse of Install\. See \fBfisher help install\fR\. Uninstall one or more plugins, by name, URL or local path\. If no arguments are given, read the standard input\. This process is the inverse of Install\. See \fBfisher help install\fR\.
. .
.P .P
Uninstall does not remove any copies of the given plugin in \fB$fisher_cache\fR\. To erase the copy from the cache, use the \fB\-\-force\fR option\. Uninstall does not remove any copies of the given plugin in \fB$fisher_cache\fR\. To erase the copy from the cache, use the \fB\-\-force\fR option\.
. .
.P .P
Uninstall does not remove any dependencies installed with other plugins\. This behavior prevents breaking plugins that share the same dependency\. See \fBfisher\fR(7){\fBFlat Tree\fR}\. Uninstall does not remove any dependencies installed with other plugins\. This behavior prevents breaking plugins that share the same dependency\. See \fBFlat Tree\fR in \fBfisher(7)\fR\.
. .
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-f\fR \fB\-\-force\fR \fB\-f \-\-force\fR
Delete copy from cache\. Delete copy from cache\.
. .
.TP .TP
\fB\-q\fR \fB\-\-quiet\fR \fB\-q \-\-quiet\fR
Enable quiet mode\. Enable quiet mode\.
. .
.TP .TP
\fB\-h\fR \fB\-\-help\fR \fB\-h \-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
@ -66,10 +66,10 @@ fisher \-\-list | fisher uninstall \-\-force
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) fisher(1)
. .
.br .br
\fBfisher help plugins\fR fisher help plugins
. .
.br .br

@ -1,34 +1,34 @@
fisher-uninstall(1) -- Disable / Uninstall Plugins fisher-uninstall(1) -- Uninstall Plugins
================================================== ==================================================
## SYNOPSIS ## SYNOPSIS
fisher `uninstall` [*name*, *url* or *path* ...] <br> fisher `uninstall` [*plugins* ...] <br>
fisher `uninstall` [`--force`] [`--quiet`] [`--help`] <br> fisher `uninstall` [`--force`] [`--quiet`] [`--help`] <br>
## USAGE ## USAGE
fisher `uninstall` *plugin* ...<br> fisher `uninstall` *plugin*<br>
fisher `uninstall` *owner/repo* ...<br> fisher `uninstall` *owner/repo*<br>
fisher `uninstall` *path* ...<br> fisher `uninstall` *path*<br>
## DESCRIPTION ## DESCRIPTION
Uninstall one or *more* plugins by *name*, searching `$fisher_index` or by *url*. If no arguments are given, read the standard input. This process is the inverse of Install. See `fisher help install`. Uninstall one or more plugins, by name, URL or local path. If no arguments are given, read the standard input. This process is the inverse of Install. See `fisher help install`.
Uninstall does not remove any copies of the given plugin in `$fisher_cache`. To erase the copy from the cache, use the `--force` option. Uninstall does not remove any copies of the given plugin in `$fisher_cache`. To erase the copy from the cache, use the `--force` option.
Uninstall does not remove any dependencies installed with other plugins. This behavior prevents breaking plugins that share the same dependency. See `fisher`(7){`Flat Tree`}. Uninstall does not remove any dependencies installed with other plugins. This behavior prevents breaking plugins that share the same dependency. See `Flat Tree` in `fisher(7)`.
## OPTIONS ## OPTIONS
* `-f` `--force`: * `-f --force`:
Delete copy from cache. Delete copy from cache.
* `-q` `--quiet`: * `-q --quiet`:
Enable quiet mode. Enable quiet mode.
* `-h` `--help`: * `-h --help`:
Show usage help. Show usage help.
## EXAMPLES ## EXAMPLES
@ -41,5 +41,5 @@ fisher --list | fisher uninstall --force
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher help plugins`<br> fisher help plugins<br>

@ -4,10 +4,10 @@
.TH "FISHER\-UPDATE" "1" "January 2016" "" "fisherman" .TH "FISHER\-UPDATE" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\-update\fR \- Fisherman Update Manager \fBfisher\-update\fR \- Update Fisherman and Plugins
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
fisher \fBupdate\fR [\fIname\fR, \fIurl\fR or \fIpath\fR \.\.\.] fisher \fBupdate\fR [\fIplugins\fR \.\.\.]
. .
.br .br
fisher \fBupdate\fR [\fB\-\-quiet\fR] [\fB\-\-help\fR] fisher \fBupdate\fR [\fB\-\-quiet\fR] [\fB\-\-help\fR]
@ -26,39 +26,58 @@ fisher \fBupdate\fR \fIpath\fR \.\.\.
.br .br
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Update one or \fImore\fR plugins by \fIname\fR, searching \fB$fisher_index\fR or by \fIurl\fR\. If no arguments are given, update Fisherman by default\. If you try to update a plugin that is currently disabled, but downloaded to the cache, it will be updated and then enabled\. Use a dash \fB\-\fR to read from the standard input\. Update one or more plugins, by name, URL or local path\. If no arguments are given, update Fisherman itself\. If you try to update a plugin that is currently disabled, but in the cache, it will be updated and then enabled\. Use a dash \fB\-\fR to read from the standard input\.
. .
.P .P
If a plugin is missing dependencies, they will be installed\. If any dependencies are already installed they will not be updated\. See \fBfisher help fishfile\fR#{\fBPlugins\fR}\. If a plugin is missing dependencies, they will be installed\. If any dependencies are already installed they will not be updated\. See \fBPlugins\fR in \fBfisher help fishfile\fR\.
. .
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-q\fR \fB\-\-quiet\fR \fB\-q \-\-quiet\fR
Enable quiet mode\. Enable quiet mode\.
. .
.TP .TP
\fB\-h\fR \fB\-\-help\fR \fB\-h \-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
. .
.IP "\(bu" 4 .IP "\(bu" 4
Update Fisherman
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher update
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Update all plugins in the cache\. Update all plugins in the cache\.
. .
.IP "" 0 .IP "" 0
. .
.P .IP "" 4
.
.nf
fisher \-\-list | fisher update \- fisher \-\-list | fisher update \-
. .
.SH "SEE ALSO" .fi
\fBfisher\fR(1)
. .
.br .IP "" 0
\fBfisher help fishfile\fR#{\fBPlugins\fR} .
.SH "SEE ALSO"
fisher(1)
. .
.br .br
\fBfisher help plugins\fR fisher help plugins
. .
.br .br

@ -1,9 +1,9 @@
fisher-update(1) -- Fisherman Update Manager fisher-update(1) -- Update Fisherman and Plugins
============================================ ================================================
## SYNOPSIS ## SYNOPSIS
fisher `update` [*name*, *url* or *path* ...] <br> fisher `update` [*plugins* ...] <br>
fisher `update` [`--quiet`] [`--help`] <br> fisher `update` [`--quiet`] [`--help`] <br>
## USAGE ## USAGE
@ -14,26 +14,33 @@ fisher `update` *path* ...<br>
## DESCRIPTION ## DESCRIPTION
Update one or *more* plugins by *name*, searching `$fisher_index` or by *url*. If no arguments are given, update Fisherman by default. If you try to update a plugin that is currently disabled, but downloaded to the cache, it will be updated and then enabled. Use a dash `-` to read from the standard input. Update one or more plugins, by name, URL or local path. If no arguments are given, update Fisherman itself. If you try to update a plugin that is currently disabled, but in the cache, it will be updated and then enabled. Use a dash `-` to read from the standard input.
If a plugin is missing dependencies, they will be installed. If any dependencies are already installed they will not be updated. See `fisher help fishfile`#{`Plugins`}. If a plugin is missing dependencies, they will be installed. If any dependencies are already installed they will not be updated. See `Plugins` in `fisher help fishfile`.
## OPTIONS ## OPTIONS
* `-q` `--quiet`: * `-q --quiet`:
Enable quiet mode. Enable quiet mode.
* `-h` `--help`: * `-h --help`:
Show usage help. Show usage help.
## EXAMPLES ## EXAMPLES
* Update Fisherman
```
fisher update
```
* Update all plugins in the cache. * Update all plugins in the cache.
```
fisher --list | fisher update - fisher --list | fisher update -
```
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher help fishfile`#{`Plugins`}<br> fisher help plugins<br>
`fisher help plugins`<br>

@ -4,7 +4,7 @@
.TH "FISHER" "1" "January 2016" "" "fisherman" .TH "FISHER" "1" "January 2016" "" "fisherman"
. .
.SH "NAME" .SH "NAME"
\fBfisher\fR \- fish plugin manager \fBfisher\fR \- Fish Plugin Manager
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
\fBfisher\fR \fIcommand\fR [\fIoptions\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] \fBfisher\fR \fIcommand\fR [\fIoptions\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
@ -19,10 +19,9 @@
\fBfisher\fR \fB\-\-file\fR=\fIfishfile\fR \fBfisher\fR \fB\-\-file\fR=\fIfishfile\fR
. .
.br .br
\fBfisher\fR \fB\-\-validate\fR
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Fisherman is a plugin manager for \fBfish\fR(1) that lets you share and reuse code, prompts and configurations easily\. Fisherman is a plugin manager for \fBfish(1)\fR that lets you share and reuse code, prompts and configurations easily\.
. .
.P .P
The following commands are available: \fIinstall\fR, \fIuninstall\fR, \fIupdate\fR, \fIsearch\fR and \fIhelp\fR\. See \fBfisher\fR help \fIcommand\fR for information about each command\. The following commands are available: \fIinstall\fR, \fIuninstall\fR, \fIupdate\fR, \fIsearch\fR and \fIhelp\fR\. See \fBfisher\fR help \fIcommand\fR for information about each command\.
@ -34,23 +33,19 @@ The following commands are available: \fIinstall\fR, \fIuninstall\fR, \fIupdate\
List plugins in the \fB$fisher_cache\fR\. Includes plugins installed using a custom URL\. List plugins in the \fB$fisher_cache\fR\. Includes plugins installed using a custom URL\.
. .
.TP .TP
\fB\-a\fR \fB\-\-alias\fR[=\fIcommand\fR=[\fIalias\fR[,\.\.\.]]] \fB\-a \-\-alias[=command=[alias[,\.\.\.]]]\fR
Define one or more comma\-separated \fIalias\fR for \fIcommand\fR using \fB$fisher_alias\fR\. If no value is given, lists all existing aliases\. Define one or more comma\-separated \fIalias\fR for \fIcommand\fR using \fB$fisher_alias\fR\. If no value is given, lists all existing aliases\.
. .
.TP .TP
\fB\-f\fR \fB\-\-file\fR=\fIfishfile\fR \fB\-f \-\-file=fishfile\fR
Read \fIfishfile\fR and display its contents\. If \fIfishfile\fR is null or an empty string, your user \fIfishfile\fR in \fB$fisher_config\fR/fishfile will be used instead\. Use a dash \fB\-\fR to force reading from the standard input\. oh\-my\-fish bundle files are supported as well\. Read \fIfishfile\fR and display its contents\. If \fIfishfile\fR is null or an empty string, your user \fIfishfile\fR in \fB$fisher_config/fishfile\fR will be used instead\. Use a dash \fB\-\fR to force reading from the standard input\. oh\-my\-fish bundle files are supported as well\.
. .
.TP .TP
\fB\-V\fR, \fB\-\-validate\fR \fB\-v \-\-version\fR
Read the standard input and validate a name, url or path\. If the input is a local path, retrieve the absolute path to the closest directory\. If the input resembles a url, normalize the url according to the rules described in \fBfisher help install\fR\. Otherwise, assume the input is a name and use the regex \fB^[a\-z]+[\._\-]?[a\-z0\-9]+\fR to validate the string\.
.
.TP
\fB\-v\fR \fB\-\-version\fR
Show version information\. Fisherman\'s current version can be found in the VERSION file at the root of the project\. The version scheme is based in \fBSemantic Versioning\fR and uses Git annotated tags to track releases\. Show version information\. Fisherman\'s current version can be found in the VERSION file at the root of the project\. The version scheme is based in \fBSemantic Versioning\fR and uses Git annotated tags to track releases\.
. .
.TP .TP
\fB\-h\fR \fB\-\-help\fR \fB\-h \-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "CUSTOM COMMANDS" .SH "CUSTOM COMMANDS"
@ -74,7 +69,7 @@ fisher install fishtape shark
.IP "" 0 .IP "" 0
. .
.TP .TP
Install plugins from a fishfile or bundle: Install plugins from a \fIfishfile\fR or bundle:
. .
.IP "" 4 .IP "" 4
@ -108,34 +103,34 @@ Fisherman was created by Jorge Bucaran \fIj@bucaran\.me\fR\.
See AUTHORS file for a more complete list of contributors\. See AUTHORS file for a more complete list of contributors\.
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(7) fisher(7)
. .
.br .br
\fBfisher\fR help \fIhelp\fR fisher help
. .
.br .br
\fBfisher\fR help \fIupdate\fR fisher update
. .
.br .br
\fBfisher\fR help \fIsearch\fR fisher search
. .
.br .br
\fBfisher\fR help \fIconfig\fR fisher config
. .
.br .br
\fBfisher\fR help \fIinstall\fR fisher install
. .
.br .br
\fBfisher\fR help \fIplugins\fR fisher plugins
. .
.br .br
\fBfisher\fR help \fIcommands\fR fisher commands
. .
.br .br
\fBfisher\fR help \fIfishfile\fR fisher fishfile
. .
.br .br
\fBfisher\fR help \fIuninstall\fR fisher uninstall
. .
.br .br

@ -1,5 +1,5 @@
fisher(1) -- fish plugin manager fisher(1) -- Fish Plugin Manager
=============================== ================================
## SYNOPSIS ## SYNOPSIS
@ -7,11 +7,10 @@ fisher(1) -- fish plugin manager
`fisher` `--list`<br> `fisher` `--list`<br>
`fisher` `--alias`[=*command*=[*alias*[,...]]]<br> `fisher` `--alias`[=*command*=[*alias*[,...]]]<br>
`fisher` `--file`=*fishfile*<br> `fisher` `--file`=*fishfile*<br>
`fisher` `--validate`
## DESCRIPTION ## DESCRIPTION
Fisherman is a plugin manager for `fish`(1) that lets you share and reuse code, prompts and configurations easily. Fisherman is a plugin manager for `fish(1)` that lets you share and reuse code, prompts and configurations easily.
The following commands are available: *install*, *uninstall*, *update*, *search* and *help*. See `fisher` help *command* for information about each command. The following commands are available: *install*, *uninstall*, *update*, *search* and *help*. See `fisher` help *command* for information about each command.
@ -20,19 +19,16 @@ The following commands are available: *install*, *uninstall*, *update*, *search*
* `--list`: * `--list`:
List plugins in the `$fisher_cache`. Includes plugins installed using a custom URL. List plugins in the `$fisher_cache`. Includes plugins installed using a custom URL.
* `-a` `--alias`[=*command*=[*alias*[,...]]]: * `-a --alias[=command=[alias[,...]]]`:
Define one or more comma-separated *alias* for *command* using `$fisher_alias`. If no value is given, lists all existing aliases. Define one or more comma-separated *alias* for *command* using `$fisher_alias`. If no value is given, lists all existing aliases.
* `-f` `--file`=*fishfile*: * `-f --file=fishfile`:
Read *fishfile* and display its contents. If *fishfile* is null or an empty string, your user *fishfile* in `$fisher_config`/fishfile will be used instead. Use a dash `-` to force reading from the standard input. oh-my-fish bundle files are supported as well. Read *fishfile* and display its contents. If *fishfile* is null or an empty string, your user *fishfile* in `$fisher_config/fishfile` will be used instead. Use a dash `-` to force reading from the standard input. oh-my-fish bundle files are supported as well.
* `-V`, `--validate`: * `-v --version`:
Read the standard input and validate a name, url or path. If the input is a local path, retrieve the absolute path to the closest directory. If the input resembles a url, normalize the url according to the rules described in `fisher help install`. Otherwise, assume the input is a name and use the regex `^[a-z]+[._-]?[a-z0-9]+` to validate the string.
* `-v` `--version`:
Show version information. Fisherman's current version can be found in the VERSION file at the root of the project. The version scheme is based in `Semantic Versioning` and uses Git annotated tags to track releases. Show version information. Fisherman's current version can be found in the VERSION file at the root of the project. The version scheme is based in `Semantic Versioning` and uses Git annotated tags to track releases.
* `-h` `--help`: * `-h --help`:
Show usage help. Show usage help.
## CUSTOM COMMANDS ## CUSTOM COMMANDS
@ -47,7 +43,7 @@ A Fisherman command is a function that you can invoke using the `fisher` utility
fisher install fishtape shark fisher install fishtape shark
``` ```
* Install plugins from a fishfile or bundle: * Install plugins from a *fishfile* or bundle:
``` ```
fisher --file=path/to/shared/fishfile | fisher install fisher --file=path/to/shared/fishfile | fisher install
@ -67,13 +63,13 @@ See AUTHORS file for a more complete list of contributors.
## SEE ALSO ## SEE ALSO
`fisher`(7)<br> fisher(7)<br>
`fisher` help *help*<br> fisher help<br>
`fisher` help *update*<br> fisher update<br>
`fisher` help *search*<br> fisher search<br>
`fisher` help *config*<br> fisher config<br>
`fisher` help *install*<br> fisher install<br>
`fisher` help *plugins*<br> fisher plugins<br>
`fisher` help *commands*<br> fisher commands<br>
`fisher` help *fishfile*<br> fisher fishfile<br>
`fisher` help *uninstall*<br> fisher uninstall<br>

@ -15,7 +15,7 @@
.br .br
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
getopts is a command line parser, designed to process command line arguments according to the POSIX Utility Syntax Guidelines\. If no arguments are given it returns \fB1\fR\. getopts is a command line parser, designed to process command line arguments based in the POSIX Utility Syntax Guidelines\. If no arguments are given getopts returns \fB1\fR\.
. .
.SH "USAGE" .SH "USAGE"
In the following example: In the following example:
@ -50,7 +50,7 @@ _ baz
The items on the left represent the option flags or \fIkeys\fR associated with the CLI\. The items on the right are the option \fIvalues\fR\. The underscore \fB_\fR character is the default \fIkey\fR for arguments without a key\. The items on the left represent the option flags or \fIkeys\fR associated with the CLI\. The items on the right are the option \fIvalues\fR\. The underscore \fB_\fR character is the default \fIkey\fR for arguments without a key\.
. .
.P .P
Use \fBread\fR(1) to process the generated stream and \fBswitch\fR(1) to match patterns: Use \fBread(1)\fR to process the generated stream and \fBswitch(1)\fR to match patterns:
. .
.IP "" 4 .IP "" 4
. .
@ -73,7 +73,7 @@ end
None\. None\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
The following is a mock of \fBfish\fR(1) CLI missing the implementation: The following is a mock of \fBfish(1)\fR CLI missing the implementation:
. .
.IP "" 4 .IP "" 4
. .

@ -8,7 +8,7 @@ getopts(1) -- Parse CLI options
## DESCRIPTION ## DESCRIPTION
getopts is a command line parser, designed to process command line arguments according to the POSIX Utility Syntax Guidelines. If no arguments are given it returns `1`. getopts is a command line parser, designed to process command line arguments based in the POSIX Utility Syntax Guidelines. If no arguments are given getopts returns `1`.
## USAGE ## USAGE
@ -29,7 +29,7 @@ _ baz
The items on the left represent the option flags or *keys* associated with the CLI. The items on the right are the option *values*. The underscore `_` character is the default *key* for arguments without a key. The items on the left represent the option flags or *keys* associated with the CLI. The items on the right are the option *values*. The underscore `_` character is the default *key* for arguments without a key.
Use `read`(1) to process the generated stream and `switch`(1) to match patterns: Use `read(1)` to process the generated stream and `switch(1)` to match patterns:
``` ```
getopts -ab1 --foo=bar baz | while read -l key option getopts -ab1 --foo=bar baz | while read -l key option
@ -48,7 +48,7 @@ None.
## EXAMPLES ## EXAMPLES
The following is a mock of `fish`(1) CLI missing the implementation: The following is a mock of `fish(1)` CLI missing the implementation:
``` ```
function fish function fish

@ -18,27 +18,27 @@ Run \fIcommands\fR as a background process and wait until the job has finished\.
.SH "OPTIONS" .SH "OPTIONS"
. .
.TP .TP
\fB\-s\fR, \fB\-\-spin\fR=\fIstyle\fR|\fIstring\fR \fB\-s \-\-spin=style|string\fR
Set spinner style\. See #{Styles} for a list of styles and instructions on how to use your own character sequences, progress bar usage, etc\. Set spinner style\. See \fBStyles\fR for a list of styles and instructions on how to use your own character sequences, progress bar usage, etc\.
. .
.TP .TP
\fB\-t\fR \fB\-\-time\fR=\fIinterval\fR \fB\-t \-\-time=interval\fR
Set spinner transition time delay in \fIseconds\fR\. A large value will refresh the spinner more slowly\. You may use decimal numbers to represent smaller numbers\. Set spinner transition time delay in \fIseconds\fR\. A large value will refresh the spinner more slowly\. You may use decimal numbers to represent smaller numbers\.
. .
.TP .TP
\fB\-l\fR \fB\-\-log\fR=\fIfile\fR \fB\-l \-\-log=file\fR
Output standard error to given \fIfile\fR\. Output standard error to given \fIfile\fR\.
. .
.TP .TP
\fB\-f\fR \fB\-\-format\fR=\fIformat\fR \fB\-f \-\-format=format\fR
Use given \fIformat\fR to display the spinner\. The default format is \fB"\er@"\fR where \fB@\fR represents the spinner token and \fB\er\fR a carriage return, used to refresh / erase the line\. Use given \fIformat\fR to display the spinner\. The default format is \fB"\er@"\fR where \fB@\fR represents the spinner token and \fB\er\fR a carriage return, used to refresh / erase the line\.
. .
.TP .TP
\fB\-h\fR \fB\-\-help\fR \fB\-h \-\-help\fR
Show usage help\. Show usage help\.
. .
.SH "STYLES" .SH "STYLES"
The following styles are supported via \fB\-\-spin=\fR\fIstyle\fR: The following styles are supported via \fB\-\-spin=style\fR:
. .
.IP "\(bu" 4 .IP "\(bu" 4
arc, star, pipe, ball, flip, mixer, caret arc, star, pipe, ball, flip, mixer, caret
@ -55,7 +55,7 @@ In addition to the default styles, you can specify a string of character tokens
For example \fB\-\-spin=12345\fR will display the numbers from 1 to 5, and \fB\-\-spin=\. \-\-format=@\fR an increasing sequence of dots\. For example \fB\-\-spin=12345\fR will display the numbers from 1 to 5, and \fB\-\-spin=\. \-\-format=@\fR an increasing sequence of dots\.
. .
.SS "PROGRESS BARS" .SS "PROGRESS BARS"
Display a progress bar with a percent indicator using \fB\-\-spin\fR=\fIbar1~3\fR: Display a progress bar with a percent indicator using \fB\-\-spin=bar1~3\fR:
. .
.IP "\(bu" 4 .IP "\(bu" 4
bar1: [=====] \fInum\fR% bar1: [=====] \fInum\fR%
@ -103,7 +103,7 @@ Run a lengthy operation as a background job and display a spinning pipe characte
. .
.nf .nf
wait \-\-spin=pipe "curl \-sS $url" wait \-\-spin=pipe "curl \-sS $URL"
. .
.fi .fi
. .
@ -116,7 +116,7 @@ Output any errors to \fIdebug\.txt\fR\.
. .
.nf .nf
if not wait \-\-spin=pipe \-\-log=debug\.txt "curl \-sS $url" if not wait \-\-spin=pipe \-\-log=debug\.txt "curl \-sS $URL"
return 1 return 1
end end
. .
@ -124,14 +124,8 @@ end
. .
.IP "" 0 .IP "" 0
. .
.SH "AUTHORS"
Jorge Bucaran \fIj@bucaran\.me\fR\.
.
.SH "SEE ALSO" .SH "SEE ALSO"
\fBsleep\fR(1) sleep(1)
.
.br
\fBhelp introduction\fR#{\fBBackground Jobs\fR}
. .
.br .br

@ -12,24 +12,24 @@ Run *commands* as a background process and wait until the job has finished. Any
## OPTIONS ## OPTIONS
* `-s`, `--spin`=*style*|*string*: * `-s --spin=style|string`:
Set spinner style. See #{Styles} for a list of styles and instructions on how to use your own character sequences, progress bar usage, etc. Set spinner style. See `Styles` for a list of styles and instructions on how to use your own character sequences, progress bar usage, etc.
* `-t` `--time`=*interval*: * `-t --time=interval`:
Set spinner transition time delay in *seconds*. A large value will refresh the spinner more slowly. You may use decimal numbers to represent smaller numbers. Set spinner transition time delay in *seconds*. A large value will refresh the spinner more slowly. You may use decimal numbers to represent smaller numbers.
* `-l` `--log`=*file*: * `-l --log=file`:
Output standard error to given *file*. Output standard error to given *file*.
* `-f` `--format`=*format*: * `-f --format=format`:
Use given *format* to display the spinner. The default format is `"\r@"` where `@` represents the spinner token and `\r` a carriage return, used to refresh / erase the line. Use given *format* to display the spinner. The default format is `"\r@"` where `@` represents the spinner token and `\r` a carriage return, used to refresh / erase the line.
* `-h` `--help`: * `-h --help`:
Show usage help. Show usage help.
## STYLES ## STYLES
The following styles are supported via `--spin=`*style*: The following styles are supported via `--spin=style`:
* arc, star, pipe, ball, flip, mixer, caret * arc, star, pipe, ball, flip, mixer, caret
* bar1~3 * bar1~3
@ -42,7 +42,7 @@ For example `--spin=12345` will display the numbers from 1 to 5, and `--spin=. -
### PROGRESS BARS ### PROGRESS BARS
Display a progress bar with a percent indicator using `--spin`=*bar1~3*: Display a progress bar with a percent indicator using `--spin=bar1~3`:
* bar1: [=====] *num*% * bar1: [=====] *num*%
* bar2: [#####] *num*% * bar2: [#####] *num*%
@ -67,23 +67,17 @@ For example:
Run a lengthy operation as a background job and display a spinning pipe character until it is finished. Run a lengthy operation as a background job and display a spinning pipe character until it is finished.
``` ```
wait --spin=pipe "curl -sS $url" wait --spin=pipe "curl -sS $URL"
``` ```
Output any errors to *debug.txt*. Output any errors to *debug.txt*.
``` ```
if not wait --spin=pipe --log=debug.txt "curl -sS $url" if not wait --spin=pipe --log=debug.txt "curl -sS $URL"
return 1 return 1
end end
``` ```
## AUTHORS
Jorge Bucaran *j@bucaran.me*.
## SEE ALSO ## SEE ALSO
`sleep`(1)<br> sleep(1)<br>
`help introduction`#{`Background Jobs`}<br>

@ -7,13 +7,13 @@
\fBfisher\-fishfile\fR \- Fishfile Format \fBfisher\-fishfile\fR \- Fishfile Format
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
A fishfile lets you share plugin configurations across multiple installations, allows plugins to declare dependencies, and prevent information loss in case of system failure\. A \fIfishfile\fR lets you share plugin configurations across multiple installations, allows plugins to declare dependencies, and prevent information loss in case of system failure\.
. .
.P .P
Fisherman also keeps a user \fIfishfile\fR in \fB$fisher_config\fR/fishfile which is automatically updated as you install or uninstall plugins\. Fisherman also keeps a user \fIfishfile\fR in \fB$fisher_config/fishfile\fR which is automatically updated as you install or uninstall plugins\.
. .
.SH "USAGE" .SH "USAGE"
Fishfiles are plain text, manifest files that list one or more plugins by their name, url or short url \fBowner/repo\fR\. Fishfiles are plain text, manifest files that list one or more plugins by their name, URL or path to a local project\.
. .
.P .P
Here is an example: Here is an example:
@ -34,10 +34,10 @@ oh\-my\-fish/bobthefish
.IP "" 0 .IP "" 0
. .
.P .P
To read fishfiles use \fBfisher \-\-file\fR=\fIfishfile\fR\. This will read \fIfishfile\fR sequentially, writing its contents to the standard output\. oh-my-fish bundle files are supported as well\. To read fishfiles use \fBfisher \-\-file=fishfile\fR\. This will read \fIfishfile\fR sequentially, writing its contents to the standard output\. oh\-my\-fish bundle files are supported as well\.
. .
.P .P
If \fIfishfile\fR is null or an empty string, the global \fIfishfile\fR in \fB$fisher_config\fR/fishfile will be used\. Use a dash \fB\-\fR to force read from standard input\. If \fIfishfile\fR is null or an empty string, the global \fIfishfile\fR in \fB$fisher_config/fishfile\fR will be used\. Use a dash \fB\-\fR to force read from standard input\.
. .
.SH "PLUGINS" .SH "PLUGINS"
Plugins may declare any number of dependencies to other plugins in a fishfile at the root of their project\. Plugins may declare any number of dependencies to other plugins in a fishfile at the root of their project\.
@ -46,16 +46,13 @@ Plugins may declare any number of dependencies to other plugins in a fishfile at
By default, when Fisherman installs a plugin, it will also fetch and install its dependencies\. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version\. For the same reason, uninstalling a plugin does not remove its dependencies\. By default, when Fisherman installs a plugin, it will also fetch and install its dependencies\. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version\. For the same reason, uninstalling a plugin does not remove its dependencies\.
. .
.P .P
To understand this behavior, it helps to recall the shell\'s single scope for functions\. The lack of private functions means that, it is \fInot\fR possible to single\-lock a specific dependency version\. See also \fBfisher\fR(7)#{\fBFlat Tree\fR}\. To understand this behavior, it helps to recall the shell\'s single scope for functions\. The lack of private functions means that, it is \fInot\fR possible to single\-lock a specific dependency version\. See also \fBFlat Tree\fR in \fBfisher(7)\fR\.
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) fisher(1)
. .
.br .br
\fBfisher help config\fR fisher help config
.
.br
\fBfisher\fR(7) #{\fBFlat Tree\fR}
. .
.br .br

@ -3,13 +3,13 @@ fisher-fishfile(5) -- Fishfile Format
## SYNOPSIS ## SYNOPSIS
A fishfile lets you share plugin configurations across multiple installations, allows plugins to declare dependencies, and prevent information loss in case of system failure. A *fishfile* lets you share plugin configurations across multiple installations, allows plugins to declare dependencies, and prevent information loss in case of system failure.
Fisherman also keeps a user *fishfile* in `$fisher_config`/fishfile which is automatically updated as you install or uninstall plugins. Fisherman also keeps a user *fishfile* in `$fisher_config/fishfile` which is automatically updated as you install or uninstall plugins.
## USAGE ## USAGE
Fishfiles are plain text, manifest files that list one or more plugins by their name, url or short url `owner/repo`. Fishfiles are plain text, manifest files that list one or more plugins by their name, URL or path to a local project.
Here is an example: Here is an example:
@ -22,9 +22,9 @@ fishtape
oh-my-fish/bobthefish oh-my-fish/bobthefish
``` ```
To read fishfiles use `fisher --file`=*fishfile*. This will read *fishfile* sequentially, writing its contents to the standard output. oh-my-fish bundle files are supported as well. To read fishfiles use `fisher --file=fishfile`. This will read *fishfile* sequentially, writing its contents to the standard output. oh-my-fish bundle files are supported as well.
If *fishfile* is null or an empty string, the global *fishfile* in `$fisher_config`/fishfile will be used. Use a dash `-` to force read from standard input. If *fishfile* is null or an empty string, the global *fishfile* in `$fisher_config/fishfile` will be used. Use a dash `-` to force read from standard input.
## PLUGINS ## PLUGINS
@ -32,10 +32,9 @@ Plugins may declare any number of dependencies to other plugins in a fishfile at
By default, when Fisherman installs a plugin, it will also fetch and install its dependencies. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version. For the same reason, uninstalling a plugin does not remove its dependencies. By default, when Fisherman installs a plugin, it will also fetch and install its dependencies. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version. For the same reason, uninstalling a plugin does not remove its dependencies.
To understand this behavior, it helps to recall the shell's single scope for functions. The lack of private functions means that, it is *not* possible to single-lock a specific dependency version. See also `fisher`(7)#{`Flat Tree`}. To understand this behavior, it helps to recall the shell's single scope for functions. The lack of private functions means that, it is *not* possible to single-lock a specific dependency version. See also `Flat Tree` in `fisher(7)`.
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher help config`<br> fisher help config<br>
`fisher`(7) #{`Flat Tree`}<br>

@ -28,7 +28,7 @@ end
Make sure it works: \fBfisher hello\fR\. Make sure it works: \fBfisher hello\fR\.
. .
.P .P
To make this function available to the current and future fish sessions, add it to \fB$XDG_CONFIG_HOME\fR/fish/functions: To make this function available to the current and future fish sessions, add it to \fB$XDG_CONFIG_HOME/fish/functions\fR:
. .
.IP "" 4 .IP "" 4
. .
@ -41,7 +41,7 @@ funcsave fisher_hello
.IP "" 0 .IP "" 0
. .
.P .P
You may also choose to save this function to \fB$fisher_config\fR/functions\. You may also choose to save this function to \fB$fisher_config/functions\fR\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
The following example implements a command to retrieve plugin information and format the output into columns\. The following example implements a command to retrieve plugin information and format the output into columns\.
@ -53,7 +53,7 @@ The following example implements a command to retrieve plugin information and fo
function fisher_info \-d "Display information about plugins" function fisher_info \-d "Display information about plugins"
switch "$argv" switch "$argv"
case \-h \-\-help case \-h \-\-help
printf "usage: fisher info name | url [\.\.\.]\en\en" printf "usage: fisher info name | URL [\.\.\.]\en\en"
printf " \-h \-\-help Show usage help\en" printf " \-h \-\-help Show usage help\en"
return return
end end
@ -67,16 +67,16 @@ end
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) fisher(1)
. .
.br .br
\fBfisher\fR(7) fisher(7)
. .
.br .br
\fBfuncsave\fR(1) funcsave(1)
. .
.br .br
\fBfisher help plugins\fR fisher help plugins
. .
.br .br

@ -18,13 +18,13 @@ end
Make sure it works: `fisher hello`. Make sure it works: `fisher hello`.
To make this function available to the current and future fish sessions, add it to `$XDG_CONFIG_HOME`/fish/functions: To make this function available to the current and future fish sessions, add it to `$XDG_CONFIG_HOME/fish/functions`:
``` ```
funcsave fisher_hello funcsave fisher_hello
``` ```
You may also choose to save this function to `$fisher_config`/functions. You may also choose to save this function to `$fisher_config/functions`.
## EXAMPLES ## EXAMPLES
@ -34,7 +34,7 @@ The following example implements a command to retrieve plugin information and fo
function fisher_info -d "Display information about plugins" function fisher_info -d "Display information about plugins"
switch "$argv" switch "$argv"
case -h --help case -h --help
printf "usage: fisher info name | url [...]\n\n" printf "usage: fisher info name | URL [...]\n\n"
printf " -h --help Show usage help\n" printf " -h --help Show usage help\n"
return return
end end
@ -46,7 +46,7 @@ end
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher`(7)<br> fisher(7)<br>
`funcsave`(1)<br> funcsave(1)<br>
`fisher help plugins`<br> fisher help plugins<br>

@ -10,41 +10,46 @@
This document describes how to use the available configuration options to customize Fisherman\. This document describes how to use the available configuration options to customize Fisherman\.
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Your fish user configuration, usually located in \fB$XDG_CONFIG_HOME\fR/fish/config\.fish is updated after installing Fisherman to add the global variables \fB$fisher_home\fR and \fB$fisher_config\fR\. Your fish user configuration, usually located in \fB$XDG_CONFIG_HOME/fish/config\.fish\fR is updated after installing Fisherman to add the global variables \fB$fisher_home\fR and \fB$fisher_config\fR\.
. .
.P .P
\fB$fisher_home\fR is the location where Fisherman was downloaded\. This location can be anywhere you like\. If you changed this location after installing Fisherman, you need to update \fB$fisher_home\fR as well\. \fB$fisher_home\fR is the directory where you downloaded Fisherman\. This location can be anywhere you like\. If you changed this location after installing Fisherman, you need to update \fB$fisher_home\fR as well\.
. .
.P .P
\fB$fisher_config\fR is the user configuration directory and the location of your user \fIfishfile\fR, \fIcache\fR directory and where plugins get installed to\. This location must be different from \fB$fisher_home\fR\. The default location is \fB$XDG_CONFIG_HOME\fR/fisherman\. \fB$fisher_config\fR is the user configuration directory and the location of your user \fIfishfile\fR, \fIcache\fR directory and where plugins get installed to\. This location must be different from \fB$fisher_home\fR\. The default location is \fB$XDG_CONFIG_HOME/fisherman\fR\.
. .
.P .P
You can also customize the debug log path, cache location, index source url, command aliases, and other options via \fB$fisher_*\fR variables\. You can also customize the debug log path, cache location, index source URL, command aliases, and other options via \fB$fisher_*\fR variables\.
. .
.SH "VARIABLES" .SH "VARIABLES"
. .
.IP "\(bu" 4 .TP
\fB$fisher_home\fR: The home directory\. This is the path where you downloaded Fisherman\. \fB$fisher_home\fR
The home directory\. This is the path where you downloaded Fisherman\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_config\fR: The user configuration directory\. \fB$XDG_CONFIG_HOME\fR/fisherman by default\. This directory is where the \fIcache\fR, \fIfunctions\fR and \fIcompletions\fR directories are located\. \fB$fisher_config\fR
The user configuration directory\. \fB$XDG_CONFIG_HOME/fisherman\fR by default\. This directory is where the \fIcache\fR, \fIfunctions\fR and \fIcompletions\fR directories are located\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_cache\fR: The cache directory\. Plugins are first downloaded here and installed to \fB$fisher_config/functions\fR afterwards\. The cache is \fB$fisher_config\fR/cache by default\. \fB$fisher_cache\fR
The cache directory\. Plugins are first downloaded here and installed to \fB$fisher_config/functions\fR afterwards\. The cache is \fB$fisher_config/cache\fR by default\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_index\fR: Index source url or file\. To use a different index set this to a file or url\. Redirect urls are not supported due to security and performance concerns\. The underlying request and fetch mechanism is based in \fBcurl\fR(1)\. See also \fBfisher\fR(7)#{\fBIndex\fR}\. \fB$fisher_index\fR
Index source URL or file\. To use a different index set this to a file or URL\. Redirect urls are not supported due to security and performance concerns\. The underlying request and fetch mechanism is based in \fBcurl(1)\fR\. See also \fBIndex\fR in \fBfisher(7)\fR\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_error_log\fR: This file keeps a log of the most recent crash stack trace\. \fB$fisher_cache\fR/\.debug_log by default\. \fB$fisher_error_log\fR
This file keeps a log of the most recent crash stack trace\. \fB$fisher_cache/\.debug_log\fR by default\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_alias\fR \fIcommand\fR=\fIalias\fR[,\.\.\.] [\fIcommand2\fR=\fIalias\fR[,\.\.\.]]: Use this variable to define custom aliases for fisher commands\. See #{\fBExamples\fR} below\. \fB$fisher_alias command=alias[,\.\.\.] [command2=alias[,\.\.\.]]\fR
Use this variable to define custom aliases for fisher commands\. See \fBExamples\fR below\.
. .
.IP "\(bu" 4 .TP
\fB$fisher_default_host\fR \fIhost\fR Use this variable to define your preferred git host\. Fisherman uses this value to convert short urls like \fBowner/repo\fR to \fBhttps://host/owner/repo\fR\. The default host is \fIgithub\.com\fR\. \fB$fisher_default_host\fR
. Use this variable to define your preferred git host\. Fisherman uses this value to convert short urls like \fBowner/repo\fR to \fBhttps://host/owner/repo\fR\. The default host is \fIgithub\.com\fR\.
.IP "" 0
. .
.SH "EXAMPLES" .SH "EXAMPLES"
. .
@ -80,7 +85,4 @@ set fisher_default_host bitbucket\.org
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(7)#{\fBIndex\fR} fisher(7)
.
.br

@ -7,13 +7,13 @@ This document describes how to use the available configuration options to custom
## DESCRIPTION ## DESCRIPTION
Your fish user configuration, usually located in `$XDG_CONFIG_HOME`/fish/config.fish is updated after installing Fisherman to add the global variables `$fisher_home` and `$fisher_config`. Your fish user configuration, usually located in `$XDG_CONFIG_HOME/fish/config.fish` is updated after installing Fisherman to add the global variables `$fisher_home` and `$fisher_config`.
`$fisher_home` is the location where Fisherman was downloaded. This location can be anywhere you like. If you changed this location after installing Fisherman, you need to update `$fisher_home` as well. `$fisher_home` is the directory where you downloaded Fisherman. This location can be anywhere you like. If you changed this location after installing Fisherman, you need to update `$fisher_home` as well.
`$fisher_config` is the user configuration directory and the location of your user *fishfile*, *cache* directory and where plugins get installed to. This location must be different from `$fisher_home`. The default location is `$XDG_CONFIG_HOME`/fisherman. `$fisher_config` is the user configuration directory and the location of your user *fishfile*, *cache* directory and where plugins get installed to. This location must be different from `$fisher_home`. The default location is `$XDG_CONFIG_HOME/fisherman`.
You can also customize the debug log path, cache location, index source url, command aliases, and other options via `$fisher_*` variables. You can also customize the debug log path, cache location, index source URL, command aliases, and other options via `$fisher_*` variables.
## VARIABLES ## VARIABLES
@ -21,21 +21,21 @@ You can also customize the debug log path, cache location, index source url, com
The home directory. This is the path where you downloaded Fisherman. The home directory. This is the path where you downloaded Fisherman.
* `$fisher_config`: * `$fisher_config`:
The user configuration directory. `$XDG_CONFIG_HOME`/fisherman by default. This directory is where the *cache*, *functions* and *completions* directories are located. The user configuration directory. `$XDG_CONFIG_HOME/fisherman` by default. This directory is where the *cache*, *functions* and *completions* directories are located.
* `$fisher_cache`: * `$fisher_cache`:
The cache directory. Plugins are first downloaded here and installed to `$fisher_config/functions` afterwards. The cache is `$fisher_config`/cache by default. The cache directory. Plugins are first downloaded here and installed to `$fisher_config/functions` afterwards. The cache is `$fisher_config/cache` by default.
* `$fisher_index`: * `$fisher_index`:
Index source url or file. To use a different index set this to a file or url. Redirect urls are not supported due to security and performance concerns. The underlying request and fetch mechanism is based in `curl`(1). See also `fisher`(7)#{`Index`}. Index source URL or file. To use a different index set this to a file or URL. Redirect urls are not supported due to security and performance concerns. The underlying request and fetch mechanism is based in `curl(1)`. See also `Index` in `fisher(7)`.
* `$fisher_error_log`: * `$fisher_error_log`:
This file keeps a log of the most recent crash stack trace. `$fisher_cache`/.debug_log by default. This file keeps a log of the most recent crash stack trace. `$fisher_cache/.debug_log` by default.
* `$fisher_alias` *command*=*alias*[,...] [*command2*=*alias*[,...]]: * `$fisher_alias command=alias[,...] [command2=alias[,...]]`:
Use this variable to define custom aliases for fisher commands. See #{`Examples`} below. Use this variable to define custom aliases for fisher commands. See `Examples` below.
* `$fisher_default_host` *host* * `$fisher_default_host`:
Use this variable to define your preferred git host. Fisherman uses this value to convert short urls like `owner/repo` to `https://host/owner/repo`. The default host is *github.com*. Use this variable to define your preferred git host. Fisherman uses this value to convert short urls like `owner/repo` to `https://host/owner/repo`. The default host is *github.com*.
## EXAMPLES ## EXAMPLES
@ -55,4 +55,4 @@ set fisher_default_host bitbucket.org
## SEE ALSO ## SEE ALSO
`fisher`(7)#{`Index`}<br> fisher(7)

@ -16,7 +16,7 @@ Fisherman is a plugin manager for fish that lets you share and reuse code, promp
Nothing\. You can continue using your shell as usual\. When you are ready to learn more just type \fBman fisher\fR or \fBman 7 fisher\fR\. Nothing\. You can continue using your shell as usual\. When you are ready to learn more just type \fBman fisher\fR or \fBman 7 fisher\fR\.
. .
.SS "How do I access other Fisherman documentation?" .SS "How do I access other Fisherman documentation?"
Fisherman documentation is based in UNIX \fBman\fR(1) pages\. See \fBman fisher\fR and \fBman 7 fisher\fR to get started\. You can also access any documentation using the \fBfisher help\fR command\. Fisherman documentation is based in UNIX \fBman(1)\fR pages\. See \fBman fisher\fR and \fBman 7 fisher\fR to get started\. You can also access any documentation using the \fBfisher help\fR command\.
. .
.SS "What are Fisherman plugins?" .SS "What are Fisherman plugins?"
Plugins are written in fish and extend the shell core functionality, run initialization code, add completions or documentations to other commands, etc\. See \fBfisher help plugins\fR\. Plugins are written in fish and extend the shell core functionality, run initialization code, add completions or documentations to other commands, etc\. See \fBfisher help plugins\fR\.
@ -43,7 +43,7 @@ There is no technical distinction between plugins, themes, commands, etc\., but
\fBExtension Commands\fR: Plugins that extend Fisherman default commands\. An extension plugin must define one or more functions like \fBfisher_<my_command>\fR\. For specific information about commands, see \fBfisher help commands\fR and then return to this guide\. \fBExtension Commands\fR: Plugins that extend Fisherman default commands\. An extension plugin must define one or more functions like \fBfisher_<my_command>\fR\. For specific information about commands, see \fBfisher help commands\fR and then return to this guide\.
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBConfiguration Plugins\fR: Plugins that include one or more \fBmy_plugin\fR\.config\.fish files\. Files that follow this convention are evaluated at the start of the session\. \fBConfiguration Plugins\fR: Plugins that include one or more \fBmy_plugin\.config\.fish\fR files\. Files that follow this convention are evaluated at the start of the session\.
. .
.IP "" 0 .IP "" 0
. .
@ -64,7 +64,7 @@ fisher install omf/plugin\-{rbenv,tab} omf/theme\-scorphish
.IP "" 0 .IP "" 0
. .
.P .P
You can use the same mechanism to a valid plugin from any given URL\. See also \fBfisher\fR(7)#{\fBCompatibility\fR}\. You can use the same mechanism to install any valid plugin from any given URL\. See also \fBCompatibility\fR in \fBfisher(7)\fR\.
. .
.SS "What does Fisherman do exactly every time I create a new shell session?" .SS "What does Fisherman do exactly every time I create a new shell session?"
Essentially, add Fisherman functions and completions to the \fB$fish_{function,complete}_path\fR and evaluate files that follow the convention \fB*\.config\.fish\fR\. Essentially, add Fisherman functions and completions to the \fB$fish_{function,complete}_path\fR and evaluate files that follow the convention \fB*\.config\.fish\fR\.
@ -88,7 +88,7 @@ end
See \fB$fisher_home/config\.fish\fR for the full code\. See \fB$fisher_home/config\.fish\fR for the full code\.
. .
.SS "How is Fisherman faster than oh\-my\-fish/Wahoo, etc?" .SS "How is Fisherman faster than oh\-my\-fish/Wahoo, etc?"
Fisherman ameliorates the slow shell start problem using a flat dependency tree instead of loading a directory hierarchy per plugin\. This also means that Fisherman performance does not decline depending on the number of plugins installed\. See also \fBfisher\fR(7)#{\fBFlat Tree\fR}\. Fisherman ameliorates the slow shell start problem using a flat dependency tree instead of loading a directory hierarchy per plugin\. This also means that Fisherman performance does not decline depending on the number of plugins installed\. See also \fBFlat Tree\fR in \fBfisher(7)\fR\.
. .
.SS "Why don\'t you contribute your improvements back to oh\-my\-fish instead of creating a new project?" .SS "Why don\'t you contribute your improvements back to oh\-my\-fish instead of creating a new project?"
I have contributed back to oh\-my\-fish extensively\. See also oh\-my\-fish history for August 27, 2015 when another project, Wahoo, was entirely merged with oh\-my\-fish\. I have contributed back to oh\-my\-fish extensively\. See also oh\-my\-fish history for August 27, 2015 when another project, Wahoo, was entirely merged with oh\-my\-fish\.
@ -97,7 +97,7 @@ I have contributed back to oh\-my\-fish extensively\. See also oh\-my\-fish hist
In addition, Fisherman was built from the ground up using a completely different design, implementation and set of principles\. In addition, Fisherman was built from the ground up using a completely different design, implementation and set of principles\.
. .
.P .P
Some features include: UNIX familiarity, minimalistic design, flat tree structure, unified plugin architecture, external self\-managed database, cache system, dependency manifest file and compatibility with oh\-my\-fish, etc\. See \fBfisher\fR(7)\. Some features include: UNIX familiarity, minimalistic design, flat tree structure, unified plugin architecture, external self\-managed database, cache system, dependency manifest file and compatibility with oh\-my\-fish, etc\. See \fBfisher(7)\fR\.
. .
.SS "How can I upgrade from an existing oh\-my\-fish or Wahoo installation?" .SS "How can I upgrade from an existing oh\-my\-fish or Wahoo installation?"
Install Fisherman\. Install Fisherman\.
@ -131,7 +131,7 @@ rm \-rf {$OMF_PATH,$OMF_CONFIG}
.IP "" 0 .IP "" 0
. .
.SS "I changed my prompt with <code>fish_config</code> and now I can\'t use any Fisherman theme, what do I do?" .SS "I changed my prompt with <code>fish_config</code> and now I can\'t use any Fisherman theme, what do I do?"
\fBfish_config\fR persists the prompt to \fBXDG_CONFIG_HOME/fish/functions\fR/fish_prompt\.fish\. That file takes precedence over Fisherman prompts that installs to \fB$fisher_config\fR/functions/\. To use Fisherman prompts remove the \fBfish_promt\.fish\fR inside \fBXDG_CONFIG_HOME/fish/functions/\fR\. \fBfish_config\fR persists the prompt to \fBXDG_CONFIG_HOME/fish/functions/fish_prompt\.fish\fR\. That file takes precedence over Fisherman prompts that installs to \fB$fisher_config/functions\fR\. To use Fisherman prompts remove the \fBfish_promt\.fish\fR inside \fBXDG_CONFIG_HOME/fish/functions\fR\.
. .
.P .P
Assuming \fBXDG_CONFIG_HOME\fR is \fB~/\.config\fR in your system: Assuming \fBXDG_CONFIG_HOME\fR is \fB~/\.config\fR in your system:

@ -18,7 +18,7 @@ Nothing. You can continue using your shell as usual. When you are ready to learn
### How do I access other Fisherman documentation? ### How do I access other Fisherman documentation?
Fisherman documentation is based in UNIX `man`(1) pages. See `man fisher` and `man 7 fisher` to get started. You can also access any documentation using the `fisher help` command. Fisherman documentation is based in UNIX `man(1)` pages. See `man fisher` and `man 7 fisher` to get started. You can also access any documentation using the `fisher help` command.
### What are Fisherman plugins? ### What are Fisherman plugins?
@ -45,7 +45,7 @@ There is no technical distinction between plugins, themes, commands, etc., but t
* `Extension Commands`: Plugins that extend Fisherman default commands. An extension plugin must define one or more functions like `fisher_<my_command>`. For specific information about commands, see `fisher help commands` and then return to this guide. * `Extension Commands`: Plugins that extend Fisherman default commands. An extension plugin must define one or more functions like `fisher_<my_command>`. For specific information about commands, see `fisher help commands` and then return to this guide.
* `Configuration Plugins`: Plugins that include one or more `my_plugin`.config.fish files. Files that follow this convention are evaluated at the start of the session. * `Configuration Plugins`: Plugins that include one or more `my_plugin.config.fish` files. Files that follow this convention are evaluated at the start of the session.
See `fisher help plugins` and `fisher help commands`. See `fisher help plugins` and `fisher help commands`.
@ -58,7 +58,7 @@ Yes. To install either a plugin or theme use their URL:
fisher install omf/plugin-{rbenv,tab} omf/theme-scorphish fisher install omf/plugin-{rbenv,tab} omf/theme-scorphish
``` ```
You can use the same mechanism to a valid plugin from any given URL. See also `fisher`(7)#{`Compatibility`}. You can use the same mechanism to install any valid plugin from any given URL. See also `Compatibility` in `fisher(7)`.
### What does Fisherman do exactly every time I create a new shell session? ### What does Fisherman do exactly every time I create a new shell session?
@ -79,7 +79,7 @@ See `$fisher_home/config.fish` for the full code.
### How is Fisherman faster than oh-my-fish/Wahoo, etc? ### How is Fisherman faster than oh-my-fish/Wahoo, etc?
Fisherman ameliorates the slow shell start problem using a flat dependency tree instead of loading a directory hierarchy per plugin. This also means that Fisherman performance does not decline depending on the number of plugins installed. See also `fisher`(7)#{`Flat Tree`}. Fisherman ameliorates the slow shell start problem using a flat dependency tree instead of loading a directory hierarchy per plugin. This also means that Fisherman performance does not decline depending on the number of plugins installed. See also `Flat Tree` in `fisher(7)`.
### Why don't you contribute your improvements back to oh-my-fish instead of creating a new project? ### Why don't you contribute your improvements back to oh-my-fish instead of creating a new project?
@ -87,7 +87,7 @@ I have contributed back to oh-my-fish extensively. See also oh-my-fish history f
In addition, Fisherman was built from the ground up using a completely different design, implementation and set of principles. In addition, Fisherman was built from the ground up using a completely different design, implementation and set of principles.
Some features include: UNIX familiarity, minimalistic design, flat tree structure, unified plugin architecture, external self-managed database, cache system, dependency manifest file and compatibility with oh-my-fish, etc. See `fisher`(7). Some features include: UNIX familiarity, minimalistic design, flat tree structure, unified plugin architecture, external self-managed database, cache system, dependency manifest file and compatibility with oh-my-fish, etc. See `fisher(7)`.
### How can I upgrade from an existing oh-my-fish or Wahoo installation? ### How can I upgrade from an existing oh-my-fish or Wahoo installation?
@ -111,7 +111,7 @@ rm -rf {$OMF_PATH,$OMF_CONFIG}
### I changed my prompt with `fish_config` and now I can't use any Fisherman theme, what do I do? ### I changed my prompt with `fish_config` and now I can't use any Fisherman theme, what do I do?
`fish_config` persists the prompt to `XDG_CONFIG_HOME/fish/functions`/fish_prompt.fish. That file takes precedence over Fisherman prompts that installs to `$fisher_config`/functions/. To use Fisherman prompts remove the `fish_promt.fish` inside `XDG_CONFIG_HOME/fish/functions/`. `fish_config` persists the prompt to `XDG_CONFIG_HOME/fish/functions/fish_prompt.fish`. That file takes precedence over Fisherman prompts that installs to `$fisher_config/functions`. To use Fisherman prompts remove the `fish_promt.fish` inside `XDG_CONFIG_HOME/fish/functions`.
Assuming `XDG_CONFIG_HOME` is `~/.config` in your system: Assuming `XDG_CONFIG_HOME` is `~/.config` in your system:

@ -24,7 +24,7 @@ There is no technical distinction between any of the terms aforementioned, but t
\fBExtension Commands\fR: Plugins that extend Fisherman default commands\. An extension plugin must define one or more functions like \fBfisher_<my_command>\fR\. For specific information about commands, see \fBfisher help commands\fR and then return to this guide\. \fBExtension Commands\fR: Plugins that extend Fisherman default commands\. An extension plugin must define one or more functions like \fBfisher_<my_command>\fR\. For specific information about commands, see \fBfisher help commands\fR and then return to this guide\.
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBConfiguration Plugins\fR: Plugins that include one or more \fBmy_plugin\fR\.config\.fish files\. Files that follow this convention are evaluated at the start of the session\. \fBConfiguration Plugins\fR: Plugins that include one or more \fBmy_plugin\.config\.fish\fR files\. Files that follow this convention are evaluated at the start of the session\.
. .
.IP "" 0 .IP "" 0
. .
@ -57,38 +57,38 @@ my_plugin
Plugins may list any number of dependencies to other plugins using a \fIfishfile\fR, see \fBfisher help fishfile\fR\. Plugins may list any number of dependencies to other plugins using a \fIfishfile\fR, see \fBfisher help fishfile\fR\.
. .
.P .P
Plugins may also define completions using \fBcomplete\fR(1) and provide documentation in the form of \fBman\fR(1) pages\. Plugins may also define completions using \fBcomplete(1)\fR and provide documentation in the form of \fBman(1)\fR pages\.
. .
.SH "EXAMPLE" .SH "EXAMPLE"
This section walks you through creating \fIwtc\fR, a stand\-alone plugin based in \fIgithub\.com/ngerakines/commitment\fR random commit message generator\. This section walks you through creating \fIwtc\fR, a stand\-alone plugin based in \fIgithub\.com/ngerakines/commitment\fR random commit message generator\.
. .
.IP "\(bu" 4 .TP
Navigate to your preferred workspace and create the plugin\'s directory and Git repository: Navigate to your preferred workspace and create the plugin\'s directory and Git repository:
. .
.IP .IP "" 4
\fBmkdir\fR \-p my/workspace/wtc; and \fBcd\fR my/workspace/wtc
. .
.br .nf
\fBgit\fR init
mkdir \-p my/workspace/wtc; and cd my/workspace/wtc
git init
git remote add origin https://github\.com/<owner>/wtc
. .
.br .fi
\fBgit\fR remote add origin https://github\.com/\fIowner\fR/wtc
. .
.br .IP "" 0
. .
.IP "\(bu" 4 .IP "\(bu" 4
Add the implementation\. Add the implementation\.
. .
.IP
\fBcat\fR > wtc\.fish
.
.IP "" 0 .IP "" 0
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
cat > wtc\.fish
function wtc \-d "Generate a random commit message" function wtc \-d "Generate a random commit message"
switch "$argv" switch "$argv"
case \-h \-\-help case \-h \-\-help
@ -107,18 +107,15 @@ end
.IP "\(bu" 4 .IP "\(bu" 4
Add completions\. \fIwtc\fR is simple enough that you could get away without \fB__fisher_complete\fR, but more complex utilities, or utilities whose CLI evolves over time, can benefit using automatic completion generation\. Note that in order to use \fB__fisher_complete\fR, your command must provide a \fB\-\-help\fR option that prints usage information to standard output\. Add completions\. \fIwtc\fR is simple enough that you could get away without \fB__fisher_complete\fR, but more complex utilities, or utilities whose CLI evolves over time, can benefit using automatic completion generation\. Note that in order to use \fB__fisher_complete\fR, your command must provide a \fB\-\-help\fR option that prints usage information to standard output\.
. .
.IP
\fBmkdir\fR completions
.
.br
\fBcat\fR > completions/wtc\.fish
.
.IP "" 0 .IP "" 0
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
mkdir completions
cat > completions/wtc\.fish
set \-l IFS ";" set \-l IFS ";"
wtc \-\-help | __fisher_complete | while read \-l info long short wtc \-\-help | __fisher_complete | while read \-l info long short
complete \-c wtc \-s "$short" \-l "$long" \-d "$info" complete \-c wtc \-s "$short" \-l "$long" \-d "$info"
@ -129,19 +126,17 @@ end
. .
.IP "" 0 .IP "" 0
. .
.IP "\(bu" 4 .TP
Add basic documentation\. Fisherman uses standard manual pages for displaying help information\. There are utilities that can help you generate man pages from other text formats, such as Markdown\. One example is \fBronn\fR(1)\. For this example, type will do: Add basic documentation\. Fisherman uses standard manual pages for displaying help information\. There are utilities that can help you generate man pages from other text formats, such as Markdown\. One example is \fBronn(1)\fR\. For this example, type will do:
.
.IP
\fBmkdir\fR \-p man/man1
.
.br
\fBcat\fR > man/man1/wtc\.1
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
mkdir \-p man/man1
cat > man/man1/wtc\.1
\.TH man 1 "Today" "1\.0" "wtc man page" \.TH man 1 "Today" "1\.0" "wtc man page"
\.SH NAME \.SH NAME
wtc \e\- Generate a random commit message wtc \e\- Generate a random commit message
@ -156,60 +151,54 @@ Add basic documentation\. Fisherman uses standard manual pages for displaying he
.fi .fi
. .
.IP "" 0 .IP "" 0
. .
.IP "\(bu" 4 .IP "\(bu" 4
Commit changes and push to the remote repository\. Commit changes and push to the remote repository\.
. .
.IP .IP "" 0
\fBgit\fR add \-\-all
.
.br
\fBgit\fR commit \-m "What the commit? 1\.0"
. .
.br .IP "" 4
\fBgit\fR push origin master
. .
.br .nf
git add \-\-all
git commit \-m "What the commit? 1\.0"
git push origin master
.
.fi
.
.IP "" 0
. .
.IP "\(bu" 4 .IP "\(bu" 4
Install with Fisherman\. If you would like to submit your package for registration install the \fBsubmit\fR plugin or send a pull request to the main index repository in \fIhttps://github\.com/fisherman/index\fR\. See \fBfisher\fR(7)#{\fBIndex\fR} for details\. Install with Fisherman\. If you would like to submit your package for registration install the \fBsubmit\fR plugin or send a pull request to the main index repository in \fIhttps://github\.com/fisherman/index\fR\. See \fBIndex\fR in \fBfisher(7)\fR\.
. .
.IP .IP "" 0
fisher install github/\fIowner\fR/wtc
. .
.br .IP "" 4
wtc
. .
.br .nf
fisher install github/*owner*/wtc
wtc
(\e /) (\e /)
.
.br
(O\.o) (O\.o)
.
.br
(> <) Bunny approves these changes\. (> <) Bunny approves these changes\.
. .
.br .fi
. .
.IP "" 0 .IP "" 0
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBman\fR(1) man(1)
.
.br
\fBcomplete\fR(1)
. .
.br .br
\fBfisher help commands\fR complete(1)
. .
.br .br
\fBfisher help fishfile\fR fisher help commands
. .
.br .br
\fBfisher\fR(7)#{\fBIndex\fR} fisher help fishfile
. .
.br .br

@ -15,7 +15,7 @@ There is no technical distinction between any of the terms aforementioned, but t
* `Extension Commands`: Plugins that extend Fisherman default commands. An extension plugin must define one or more functions like `fisher_<my_command>`. For specific information about commands, see `fisher help commands` and then return to this guide. * `Extension Commands`: Plugins that extend Fisherman default commands. An extension plugin must define one or more functions like `fisher_<my_command>`. For specific information about commands, see `fisher help commands` and then return to this guide.
* `Configuration Plugins`: Plugins that include one or more `my_plugin`.config.fish files. Files that follow this convention are evaluated at the start of the session. * `Configuration Plugins`: Plugins that include one or more `my_plugin.config.fish` files. Files that follow this convention are evaluated at the start of the session.
The following tree is that of a plugin that displays the characteristics of all the plugins described above. The following tree is that of a plugin that displays the characteristics of all the plugins described above.
@ -37,7 +37,7 @@ my_plugin
Plugins may list any number of dependencies to other plugins using a *fishfile*, see `fisher help fishfile`. Plugins may list any number of dependencies to other plugins using a *fishfile*, see `fisher help fishfile`.
Plugins may also define completions using `complete`(1) and provide documentation in the form of `man`(1) pages. Plugins may also define completions using `complete(1)` and provide documentation in the form of `man(1)` pages.
## EXAMPLE ## EXAMPLE
@ -46,16 +46,17 @@ This section walks you through creating *wtc*, a stand-alone plugin based in *gi
* Navigate to your preferred workspace and create the plugin's directory and Git repository: * Navigate to your preferred workspace and create the plugin's directory and Git repository:
`mkdir` -p my/workspace/wtc; and `cd` my/workspace/wtc<br> ```
`git` init<br> mkdir -p my/workspace/wtc; and cd my/workspace/wtc
`git` remote add origin https://github.com/*owner*/wtc<br> git init
git remote add origin https://github.com/<owner>/wtc
```
* Add the implementation. * Add the implementation.
`cat` > wtc.fish
``` ```
cat > wtc.fish
function wtc -d "Generate a random commit message" function wtc -d "Generate a random commit message"
switch "$argv" switch "$argv"
case -h --help case -h --help
@ -70,10 +71,10 @@ end
* Add completions. *wtc* is simple enough that you could get away without `__fisher_complete`, but more complex utilities, or utilities whose CLI evolves over time, can benefit using automatic completion generation. Note that in order to use `__fisher_complete`, your command must provide a `--help` option that prints usage information to standard output. * Add completions. *wtc* is simple enough that you could get away without `__fisher_complete`, but more complex utilities, or utilities whose CLI evolves over time, can benefit using automatic completion generation. Note that in order to use `__fisher_complete`, your command must provide a `--help` option that prints usage information to standard output.
`mkdir` completions<br>
`cat` > completions/wtc.fish
``` ```
mkdir completions
cat > completions/wtc.fish
set -l IFS ";" set -l IFS ";"
wtc --help | __fisher_complete | while read -l info long short wtc --help | __fisher_complete | while read -l info long short
complete -c wtc -s "$short" -l "$long" -d "$info" complete -c wtc -s "$short" -l "$long" -d "$info"
@ -81,13 +82,12 @@ end
^C ^C
``` ```
* Add basic documentation. Fisherman uses standard manual pages for displaying help information. There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn`(1). For this example, type will do: * Add basic documentation. Fisherman uses standard manual pages for displaying help information. There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn(1)`. For this example, type will do:
`mkdir` -p man/man1<br>
`cat` > man/man1/wtc.1
``` ```
mkdir -p man/man1
cat > man/man1/wtc.1
.TH man 1 "Today" "1.0" "wtc man page" .TH man 1 "Today" "1.0" "wtc man page"
.SH NAME .SH NAME
wtc \- Generate a random commit message wtc \- Generate a random commit message
@ -102,25 +102,26 @@ end
* Commit changes and push to the remote repository. * Commit changes and push to the remote repository.
`git` add --all<br> ```
`git` commit -m "What the commit? 1.0"<br> git add --all
`git` push origin master<br> git commit -m "What the commit? 1.0"
git push origin master
```
* Install with Fisherman. If you would like to submit your package for registration install the `submit` plugin or send a pull request to the main index repository in *https://github.com/fisherman/index*. See `fisher`(7)#{`Index`} for details.
* Install with Fisherman. If you would like to submit your package for registration install the `submit` plugin or send a pull request to the main index repository in *https://github.com/fisherman/index*. See `Index` in `fisher(7)`.
fisher install github/*owner*/wtc<br> ```
wtc<br> fisher install github/*owner*/wtc
(\ /)<br> wtc
(O.o)<br> (\ /)
(> <) Bunny approves these changes.<br> (O.o)
(> <) Bunny approves these changes.
```
## SEE ALSO ## SEE ALSO
`man`(1)<br> man(1)<br>
`complete`(1)<br> complete(1)<br>
`fisher help commands`<br> fisher help commands<br>
`fisher help fishfile`<br> fisher help fishfile<br>
`fisher`(7)#{`Index`}<br>

@ -7,13 +7,13 @@
\fBfisher\fR \- An Introduction to Fisherman \fBfisher\fR \- An Introduction to Fisherman
. .
.SH "DESCRIPTION" .SH "DESCRIPTION"
Fisherman is a plugin manager for \fBfish\fR(1) that lets you share and reuse code, prompts and configurations easily\. Fisherman is a plugin manager for \fBfish(1)\fR that lets you share and reuse code, prompts and configurations easily\.
. .
.P .P
Some features include: minimalistic design, flat tree structure, unified plugin architecture, external self\-managed database, cache system, dependency manifest file and compatibility with oh-my-fish and other frameworks\. Some features include: minimalistic design, flat tree structure, unified plugin architecture, external self\-managed database, cache system, dependency manifest file and compatibility with oh\-my\-fish and other frameworks\.
. .
.P .P
This document describes Fisherman features and some of their implementation details\. For usage and command help see also \fBfisher\fR(1)\. This document describes Fisherman features and some of their implementation details\. For usage and command help see also \fBfisher(1)\fR\.
. .
.SH "FLAT TREE" .SH "FLAT TREE"
The configuration directory structure is optimized to help fish start new sessions as quickly as possible, regardless of the numbers of plugins or prompts enabled at any given time\. The configuration directory structure is optimized to help fish start new sessions as quickly as possible, regardless of the numbers of plugins or prompts enabled at any given time\.
@ -55,7 +55,7 @@ With this in mind, it\'s possible to improve the slow shell start problem using
The overhead of juggling multiple path hierarchies in a per\-plugin basis yields no benefits as everything is shared in the same scope\. The overhead of juggling multiple path hierarchies in a per\-plugin basis yields no benefits as everything is shared in the same scope\.
. .
.P .P
Loading a path simply means adding the desired location to the \fB$fish_function_path\fR array\. See also \fBfunctions\fR(1)\. Loading a path simply means adding the desired location to the \fB$fish_function_path\fR array\. See also \fBfunctions(1)\fR\.
. .
.P .P
Here is a snapshot of a typical configuration path with a single plugin and prompt: Here is a snapshot of a typical configuration path with a single plugin and prompt:
@ -83,10 +83,10 @@ $fisher_config
.IP "" 0 .IP "" 0
. .
.P .P
If you are already familiar in the way fish handles your user configuration, you will find the above structure similar to \fB$XDG_CONFIG_HOME/fish\fR\. See \fBhelp fish\fR#{\fBInitialization Files\fR} to learn more about fish configuration\. If you are already familiar in the way fish handles your user configuration, you will find the above structure similar to \fB$XDG_CONFIG_HOME/fish\fR\. See \fBInitialization Files\fR in \fBhelp fish\fR to learn more about fish configuration\.
. .
.P .P
\fBconf\.d\fR, short for configuration directory, is used for initialization files, i\.e\., files that should run at the start of the shell\. Files that follow the naming convention \fIname\fR\.config\.fish are added there\. \fBconf\.d\fR, short for configuration directory, is used for initialization files, i\.e\., files that should run at the start of the shell\. Files that follow the naming convention \fB<name>\.config\.fish\fR are added there\.
. .
.SS "PLUGINS" .SS "PLUGINS"
Plugins are components that extend and add features to your shell\. To see what plugins are available use \fBfisher search\fR\. You can also type \fBfisher install\fR and hit \fItab\fR once to get full name completions and plugin information\. The same works for \fBfisher update\fR and \fBfisher uninstall\fR\. Plugins are components that extend and add features to your shell\. To see what plugins are available use \fBfisher search\fR\. You can also type \fBfisher install\fR and hit \fItab\fR once to get full name completions and plugin information\. The same works for \fBfisher update\fR and \fBfisher uninstall\fR\.
@ -108,13 +108,13 @@ fisher install shark
.IP "" 0 .IP "" 0
. .
.P .P
Otherwise, you can use the repository remote \fIurl\fR\. Otherwise, you can use the repository remote \fIURL\fR\.
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
fisher install oh\-my\-fish/bobthefish fisher install simnalamburt/shellder
. .
.fi .fi
. .
@ -124,16 +124,22 @@ fisher install oh\-my\-fish/bobthefish
If the domain or host is not provided, Fisherman will use any value in \fB$fisher_default_host\fR\. The default value is \fBhttps://github\.com\fR\. If the domain or host is not provided, Fisherman will use any value in \fB$fisher_default_host\fR\. The default value is \fBhttps://github\.com\fR\.
. .
.P .P
In addition, all of the following variations are accepted: In addition, all of the following \fBowner/repo\fR variations are accepted:
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgithub\fR/owner/repo \fB\->\fR https://github\.com/owner/repo owner/repo \fB>\fR https://github\.com/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgh:\fRowner/repo \fB\->\fR https://github\.com/owner/repo \fIgithub\fR/owner/repo \fB>\fR https://github\.com/owner/repo
.
.br
.
.IP "\(bu" 4
\fIgh\fR/owner/repo \fB>\fR https://github\.com/owner/repo
. .
.br .br
@ -141,22 +147,22 @@ In addition, all of the following variations are accepted:
.IP "" 0 .IP "" 0
. .
.P .P
Shortcuts for other common Git repository hosting services are also available: Shortcuts to other common Git repository hosting services are also available:
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBbb:\fR/owner/repo \fB\->\fR https://bitbucket\.org/owner/repo \fIbb\fR/owner/repo \fB>\fR https://bitbucket\.org/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBgl:\fR/owner/repo \fB\->\fR https://gitlab\.com/owner/repo \fIgl\fR/owner/repo \fB>\fR https://gitlab\.com/owner/repo
. .
.br .br
. .
.IP "\(bu" 4 .IP "\(bu" 4
\fBomf:\fR/owner/repo \fB\->\fR https://github\.com/oh\-my\-fish/repo \fIomf\fR/owner/repo \fB>\fR https://github\.com/oh\-my\-fish/repo
. .
.br .br
@ -170,7 +176,7 @@ Because of Fisherman\'s flat tree model, there is no technical distinction betwe
Throughout this document and other Fisherman manuals you will find the term prompt when referring to the \fIconcept\fR of a theme, i\.e\., a plugin that defines a \fBfish_prompt\fR and / or \fBfish_right_prompt\fR functions\. Throughout this document and other Fisherman manuals you will find the term prompt when referring to the \fIconcept\fR of a theme, i\.e\., a plugin that defines a \fBfish_prompt\fR and / or \fBfish_right_prompt\fR functions\.
. .
.SS "INDEX" .SS "INDEX"
You can install, update and uninstall plugins by name, querying the Fisherman index, or by url using several of the variations described in #{\fBPlugins\fR}\. The index is a plain text flat database \fIindependent\fR from Fisherman\. You can use a custom index file by setting \fB$fisher_index\fR to your own file or url\. Redirection urls are not supported due to security and performance concerns\. See \fBfisher help config\fR\. You can install, update and uninstall plugins by name, querying the Fisherman index, or by URL using several of the variations described in \fBPlugins\fR\. The index is a plain text flat database \fIindependent\fR from Fisherman\. You can use a custom index file by setting \fB$fisher_index\fR to your own file or URL\. Redirection urls are not supported due to security and performance concerns\. See \fBfisher help config\fR\.
. .
.P .P
A copy of the index is downloaded each time a query happens\. This keeps the index up to date and allows you to search the database offline\. A copy of the index is downloaded each time a query happens\. This keeps the index up to date and allows you to search the database offline\.
@ -225,7 +231,7 @@ You can also submit a new plugin manually and create a pull request\.
git clone https://github\.com/fisherman/fisher\-index git clone https://github\.com/fisherman/fisher\-index
cd index cd index
echo "$name\en$url\en$info\en$author\en$tags\en\en" >> index echo "$name\en$URL\en$info\en$author\en$tags\en\en" >> index
git push origin master git push origin master
open http://github\.com open http://github\.com
. .
@ -273,13 +279,13 @@ The fishfile updates as you install / uninstall plugins\. See also \fBfisher hel
Plugins may list any number of dependencies to other plugins in a fishfile at the root of each project\. By default, when Fisherman installs a plugin, it will also fetch and install its dependencies\. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version\. For the same reasons, uninstalling a plugin does not remove its dependencies\. See \fBfisher help update\fR\. Plugins may list any number of dependencies to other plugins in a fishfile at the root of each project\. By default, when Fisherman installs a plugin, it will also fetch and install its dependencies\. If a dependency is already installed, it will not be updated as this could potentially break other plugins using an older version\. For the same reasons, uninstalling a plugin does not remove its dependencies\. See \fBfisher help update\fR\.
. .
.SS "CONFIGURATION" .SS "CONFIGURATION"
Fisherman allows a high level of configuration using \fB$fisher_*\fR variables\. You can customize the home and configuration directories, debug log file, cache location, index source url, command aliases, etc\. See \fBfisher help config\fR\. Fisherman allows a high level of configuration using \fB$fisher_*\fR variables\. You can customize the home and configuration directories, debug log file, cache location, index source URL, command aliases, etc\. See \fBfisher help config\fR\.
. .
.P .P
You can also extend Fisherman by adding new commands and ship them as plugins as well\. Fisherman automatically adds completions to \fIcommands\fR based in the function \fIdescription\fR and usage help if provided\. See \fBfisher help help\fR and \fBfisher help commands\fR\. You can also extend Fisherman by adding new commands and ship them as plugins as well\. Fisherman automatically adds completions to \fIcommands\fR based in the function \fIdescription\fR and usage help if provided\. See \fBfisher help help\fR and \fBfisher help commands\fR\.
. .
.P .P
To add completions to standalone utility plugins, use \fBcomplete\fR(1)\. To add completions to standalone utility plugins, use \fBcomplete(1)\fR\.
. .
.SS "CLI" .SS "CLI"
If you are already familiar with other UNIX tools, you\'ll find Fisherman commands behave intuitively\. If you are already familiar with other UNIX tools, you\'ll find Fisherman commands behave intuitively\.
@ -288,19 +294,19 @@ If you are already familiar with other UNIX tools, you\'ll find Fisherman comman
Most commands read the standard input by default when no options are given and produce easy to parse output, making Fisherman commands ideal for plumbing and building upon each other\. Most commands read the standard input by default when no options are given and produce easy to parse output, making Fisherman commands ideal for plumbing and building upon each other\.
. .
.P .P
Fisherman also ships with a CLI options parser and a background job wait spinner that you can use to implement your own commands CLI\. See \fBgetopts\fR(1) and \fBwait\fR(1)\. Fisherman also ships with a CLI options parser and a background job wait spinner that you can use to implement your own commands CLI\. See \fBgetopts(1)\fR and \fBwait(1)\fR\.
. .
.SH "COMPATIBILITY" .SH "COMPATIBILITY"
Fisherman supports oh-my-fish (Wahoo) themes and plugins by default, but some features are turned off due to performance considerations\. Fisherman supports oh\-my\-fish (Wahoo) themes and plugins by default, but some features are turned off due to performance considerations\.
. .
.P .P
oh-my-fish evaluates every \fI\.fish\fR file inside the root directory of every plugin during initialization\. This is necessary in order to register any existing \fBinit\fR events and invoke them using fish \fBemit\fR(1)\. oh\-my\-fish evaluates every \fI\.fish\fR file inside the root directory of every plugin during initialization\. This is necessary in order to register any existing \fBinit\fR events and invoke them using fish \fBemit(1)\fR\.
. .
.P .P
Since it is not possible to determine whether a file defines an initialization event without evaluating its contents first, oh-my-fish sources all \fI\.fish\fR files and then emits events for each plugin\. Since it is not possible to determine whether a file defines an initialization event without evaluating its contents first, oh\-my\-fish sources all \fB*\.fish\fR files and then emits events for each plugin\.
. .
.P .P
Not all plugins opt in the initialization mechanism, therefore support for this behavior is turned off by default\. If you would like Fisherman to behave like oh-my-fish at the start of each session, install the \fBomf\fR compatibility plugin\. Not all plugins opt in the initialization mechanism, therefore support for this behavior is turned off by default\. If you would like Fisherman to behave like oh\-my\-fish at the start of every session, install the \fBomf\fR compatibility plugin\.
. .
.IP "" 4 .IP "" 4
. .
@ -313,28 +319,28 @@ fisher install omf
.IP "" 0 .IP "" 0
. .
.P .P
This plugin also adds definitions for some of oh-my-fish Core Library functions\. This plugin also adds definitions for some of oh\-my\-fish Core Library functions\.
. .
.SH "SEE ALSO" .SH "SEE ALSO"
\fBfisher\fR(1) fisher(1)
. .
.br .br
\fBfisher help\fR fisher help
. .
.br .br
\fBfisher help config\fR fisher help config
. .
.br .br
\fBfisher help plugins\fR fisher help plugins
. .
.br .br
\fBfisher help commands\fR fisher help commands
. .
.br .br
\fBwait\fR(1) wait(1)
. .
.br .br
\fBgetopts\fR(1) getopts(1)
. .
.br .br

@ -3,11 +3,11 @@ fisher(7) -- An Introduction to Fisherman
## DESCRIPTION ## DESCRIPTION
Fisherman is a plugin manager for `fish`(1) that lets you share and reuse code, prompts and configurations easily. Fisherman is a plugin manager for `fish(1)` that lets you share and reuse code, prompts and configurations easily.
Some features include: minimalistic design, flat tree structure, unified plugin architecture, external self-managed database, cache system, dependency manifest file and compatibility with oh-my-fish and other frameworks. Some features include: minimalistic design, flat tree structure, unified plugin architecture, external self-managed database, cache system, dependency manifest file and compatibility with oh-my-fish and other frameworks.
This document describes Fisherman features and some of their implementation details. For usage and command help see also `fisher`(1). This document describes Fisherman features and some of their implementation details. For usage and command help see also `fisher(1)`.
## FLAT TREE ## FLAT TREE
@ -37,7 +37,7 @@ With this in mind, it's possible to improve the slow shell start problem using a
The overhead of juggling multiple path hierarchies in a per-plugin basis yields no benefits as everything is shared in the same scope. The overhead of juggling multiple path hierarchies in a per-plugin basis yields no benefits as everything is shared in the same scope.
Loading a path simply means adding the desired location to the `$fish_function_path` array. See also `functions`(1). Loading a path simply means adding the desired location to the `$fish_function_path` array. See also `functions(1)`.
Here is a snapshot of a typical configuration path with a single plugin and prompt: Here is a snapshot of a typical configuration path with a single plugin and prompt:
@ -55,9 +55,9 @@ Here is a snapshot of a typical configuration path with a single plugin and prom
|-- man1/ |-- man1/
|-- my_plugin.1 |-- my_plugin.1
If you are already familiar in the way fish handles your user configuration, you will find the above structure similar to `$XDG_CONFIG_HOME/fish`. See `help fish`#{`Initialization Files`} to learn more about fish configuration. If you are already familiar in the way fish handles your user configuration, you will find the above structure similar to `$XDG_CONFIG_HOME/fish`. See `Initialization Files` in `help fish` to learn more about fish configuration.
`conf.d`, short for configuration directory, is used for initialization files, i.e., files that should run at the start of the shell. Files that follow the naming convention *name*.config.fish are added there. `conf.d`, short for configuration directory, is used for initialization files, i.e., files that should run at the start of the shell. Files that follow the naming convention `<name>.config.fish` are added there.
### PLUGINS ### PLUGINS
@ -71,24 +71,25 @@ To install a plugin, you can use their *name* if they are listed in `$fisher_ind
fisher install shark fisher install shark
``` ```
Otherwise, you can use the repository remote *url*. Otherwise, you can use the repository remote *URL*.
``` ```
fisher install oh-my-fish/bobthefish fisher install simnalamburt/shellder
``` ```
If the domain or host is not provided, Fisherman will use any value in `$fisher_default_host`. The default value is `https://github.com`. If the domain or host is not provided, Fisherman will use any value in `$fisher_default_host`. The default value is `https://github.com`.
In addition, all of the following variations are accepted: In addition, all of the following `owner/repo` variations are accepted:
* `github`/owner/repo `->` https://github.com/owner/repo<br> * owner/repo `>` https://github.com/owner/repo<br>
* `gh:`owner/repo `->` https://github.com/owner/repo<br> * *github*/owner/repo `>` https://github.com/owner/repo<br>
* *gh*/owner/repo `>` https://github.com/owner/repo<br>
Shortcuts for other common Git repository hosting services are also available: Shortcuts to other common Git repository hosting services are also available:
* `bb:`/owner/repo `->` https://bitbucket.org/owner/repo<br> * *bb*/owner/repo `>` https://bitbucket.org/owner/repo<br>
* `gl:`/owner/repo `->` https://gitlab.com/owner/repo<br> * *gl*/owner/repo `>` https://gitlab.com/owner/repo<br>
* `omf:`/owner/repo `->` https://github.com/oh-my-fish/repo<br> * *omf*/owner/repo `>` https://github.com/oh-my-fish/repo<br>
Because of Fisherman's flat tree model, there is no technical distinction between plugins or prompts. Installing a prompt is equivalent to switching themes in other systems. The interface is always *install*, *update* or *uninstall*. Because of Fisherman's flat tree model, there is no technical distinction between plugins or prompts. Installing a prompt is equivalent to switching themes in other systems. The interface is always *install*, *update* or *uninstall*.
@ -96,7 +97,7 @@ Throughout this document and other Fisherman manuals you will find the term prom
### INDEX ### INDEX
You can install, update and uninstall plugins by name, querying the Fisherman index, or by url using several of the variations described in #{`Plugins`}. The index is a plain text flat database *independent* from Fisherman. You can use a custom index file by setting `$fisher_index` to your own file or url. Redirection urls are not supported due to security and performance concerns. See `fisher help config`. You can install, update and uninstall plugins by name, querying the Fisherman index, or by URL using several of the variations described in `Plugins`. The index is a plain text flat database *independent* from Fisherman. You can use a custom index file by setting `$fisher_index` to your own file or URL. Redirection urls are not supported due to security and performance concerns. See `fisher help config`.
A copy of the index is downloaded each time a query happens. This keeps the index up to date and allows you to search the database offline. A copy of the index is downloaded each time a query happens. This keeps the index up to date and allows you to search the database offline.
@ -127,7 +128,7 @@ You can also submit a new plugin manually and create a pull request.
``` ```
git clone https://github.com/fisherman/fisher-index git clone https://github.com/fisherman/fisher-index
cd index cd index
echo "$name\n$url\n$info\n$author\n$tags\n\n" >> index echo "$name\n$URL\n$info\n$author\n$tags\n\n" >> index
git push origin master git push origin master
open http://github.com open http://github.com
``` ```
@ -164,11 +165,11 @@ Plugins may list any number of dependencies to other plugins in a fishfile at th
### CONFIGURATION ### CONFIGURATION
Fisherman allows a high level of configuration using `$fisher_*` variables. You can customize the home and configuration directories, debug log file, cache location, index source url, command aliases, etc. See `fisher help config`. Fisherman allows a high level of configuration using `$fisher_*` variables. You can customize the home and configuration directories, debug log file, cache location, index source URL, command aliases, etc. See `fisher help config`.
You can also extend Fisherman by adding new commands and ship them as plugins as well. Fisherman automatically adds completions to *commands* based in the function *description* and usage help if provided. See `fisher help help` and `fisher help commands`. You can also extend Fisherman by adding new commands and ship them as plugins as well. Fisherman automatically adds completions to *commands* based in the function *description* and usage help if provided. See `fisher help help` and `fisher help commands`.
To add completions to standalone utility plugins, use `complete`(1). To add completions to standalone utility plugins, use `complete(1)`.
### CLI ### CLI
@ -176,17 +177,17 @@ If you are already familiar with other UNIX tools, you'll find Fisherman command
Most commands read the standard input by default when no options are given and produce easy to parse output, making Fisherman commands ideal for plumbing and building upon each other. Most commands read the standard input by default when no options are given and produce easy to parse output, making Fisherman commands ideal for plumbing and building upon each other.
Fisherman also ships with a CLI options parser and a background job wait spinner that you can use to implement your own commands CLI. See `getopts`(1) and `wait`(1). Fisherman also ships with a CLI options parser and a background job wait spinner that you can use to implement your own commands CLI. See `getopts(1)` and `wait(1)`.
## COMPATIBILITY ## COMPATIBILITY
Fisherman supports oh-my-fish (Wahoo) themes and plugins by default, but some features are turned off due to performance considerations. Fisherman supports oh-my-fish (Wahoo) themes and plugins by default, but some features are turned off due to performance considerations.
oh-my-fish evaluates every *.fish* file inside the root directory of every plugin during initialization. This is necessary in order to register any existing `init` events and invoke them using fish `emit`(1). oh-my-fish evaluates every *.fish* file inside the root directory of every plugin during initialization. This is necessary in order to register any existing `init` events and invoke them using fish `emit(1)`.
Since it is not possible to determine whether a file defines an initialization event without evaluating its contents first, oh-my-fish sources all *.fish* files and then emits events for each plugin. Since it is not possible to determine whether a file defines an initialization event without evaluating its contents first, oh-my-fish sources all `*.fish` files and then emits events for each plugin.
Not all plugins opt in the initialization mechanism, therefore support for this behavior is turned off by default. If you would like Fisherman to behave like oh-my-fish at the start of each session, install the `omf` compatibility plugin. Not all plugins opt in the initialization mechanism, therefore support for this behavior is turned off by default. If you would like Fisherman to behave like oh-my-fish at the start of every session, install the `omf` compatibility plugin.
``` ```
fisher install omf fisher install omf
@ -196,10 +197,10 @@ This plugin also adds definitions for some of oh-my-fish Core Library functions.
## SEE ALSO ## SEE ALSO
`fisher`(1)<br> fisher(1)<br>
`fisher help`<br> fisher help<br>
`fisher help config`<br> fisher help config<br>
`fisher help plugins`<br> fisher help plugins<br>
`fisher help commands`<br> fisher help commands<br>
`wait`(1)<br> wait(1)<br>
`getopts`(1)<br> getopts(1)<br>

@ -45,7 +45,7 @@ test "evaluate \$fisher_alias=<command=alias[,...]> as aliases"
end end
test "display usage" test "display usage"
(fisher | sed 3q | xargs) = "usage: fisher [--version] [--help] [--list] [--quiet] [-a <command>=alias[,...]] [-f <path>] <command> [<options>]" (fisher | sed 1q) = "usage: fisher <command> [<options>] [--version] [--help]"
end end
test "display help information about 'help' at the bottom" test "display help information about 'help' at the bottom"

@ -16,11 +16,6 @@ function -S teardown
rm -rf $path rm -rf $path
end end
test "help wraps `fisher` w/o arguments"
(fisher help) = (fisher)
end
test "help --all shows commands and guides" test "help --all shows commands and guides"
! -z (fisher help --all | grep -E 'Available Commands:$|Other Documentation:$' | xargs) ! -z (fisher help --all | grep -E 'Available Commands:$|Other Documentation:$' | xargs)
end end
@ -30,7 +25,7 @@ test "help --guides shows guides"
end end
test "help --usage shows command usage info" test "help --usage shows command usage info"
(fisher help --usage=help) = (fisher help --help) (fisher help --usage=help) = (fisher help -h)
end end
for i in $sections for i in $sections
@ -41,5 +36,5 @@ end
test "display usage help" test "display usage help"
(fisher help --commands=bare | fisher help --usage | xargs (fisher help --commands=bare | fisher help --usage | xargs
) = "usage: fisher help [<keyword>] [--all] [--guides] [--help] -a --all List available documentation -g --guides List available guides -u --usage[=<cmd>] Display command usage help -h --help Show usage help usage: fisher install [<name or url> ...] [--link] [--quiet] [--help] -s --link Install as symbolic links -q --quiet Enable quiet mode -h --help Show usage help usage: fisher search [<name or url>] [--select=<source>] [--quiet] [--or|--and] [--field=<field>] [--help] -s --select=<source> Select all, cache or remote plugins -f --field=<field> Filter by name, url, info, tag or author -a --and Join query with AND operator -o --or Join query with OR operator -q --quiet Enable quiet mode -h --help Show usage help usage: fisher uninstall [<name or url> ...] [--force] [--quiet] [--help] -f --force Delete copy from cache -q --quiet Enable quiet mode -h --help Show usage help usage: fisher update [<name or url> ...] [--quiet] [--help] -q --quiet Enable quiet mode -h --help Show usage help" ) = "usage: fisher help [<keyword>] [--all] [--guides] [--help] -a --all List available documentation -g --guides List available guides -u --usage[=<cmd>] Display command usage -h --help Show usage help usage: fisher install [<plugins>] [--quiet] [--help] -q --quiet Enable quiet mode -h --help Show usage help usage: fisher search [<plugins>] [--select=<source>] [--quiet] [--or|--and] [--field=<field>] [--help] -s --select=<source> Select all, cache or remote plugins -f --field=<field> Filter by name, url, info, tag or author -o --or | -a --and Join query with AND/OR operator -q --quiet Enable quiet mode -h --help Show usage help usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help] -f --force Delete copy from cache -q --quiet Enable quiet mode -h --help Show usage help usage: fisher update [<plugins>] [--quiet] [--help] -q --quiet Enable quiet mode -h --help Show usage help"
end end

@ -19,7 +19,7 @@ end
function -S teardown function -S teardown
rm -rf $path rm -rf $path
rm -rf $source/{$names}.git rm -rf $source/{$names}/.git
end end
test "install creates config directory if there is none" test "install creates config directory if there is none"

@ -20,7 +20,7 @@ end
function -S teardown function -S teardown
rm -rf $path rm -rf $path
rm -rf $source/{$names}.git rm -rf $source/{$names}/.git
end end
for name in $names for name in $names

@ -16,7 +16,11 @@ function -S setup
fisher_mock_index $source $names > $index fisher_mock_index $source $names > $index
fisher_mock_config $path $index fisher_mock_config $path $index
fisher install $names -q mkdir -p $fisher_cache
for name in $names
cp -rf $source/$name $fisher_cache
end
mkdir -p $source2 mkdir -p $source2

@ -7,79 +7,75 @@ function -S setup
end end
test "validate names" test "validate names"
$id[1] = (printf "%s\n" $id[1] | fisher --validate) $id[1] = (printf "%s\n" $id[1] | __fisher_validate)
end end
test "validate uris" test "validate uris"
$fisher_default_host/$id[1]/$id[2] = ( $fisher_default_host/$id[1]/$id[2] = (
printf "%s\n" $id[1]/$id[2] | fisher --validate) printf "%s\n" $id[1]/$id[2] | __fisher_validate)
end end
test "validate names may end with a number" test "validate names may end with a number"
"a0" = (printf "%s\n" a0 | fisher --validate) "a0" = (printf "%s\n" a0 | __fisher_validate)
end end
test "validate names may start in uppercase" test "validate names may start in uppercase"
-z (printf "%s\n" A | fisher --validate) -z (printf "%s\n" A | __fisher_validate)
end end
test "validate names may not start with a number" test "validate names may not start with a number"
-z (printf "%s\n" 0abc | fisher --validate) -z (printf "%s\n" 0abc | __fisher_validate)
end
test "supress validation output"
-z (printf "%s\n" $id[1] | fisher --validate --quiet)
end end
test "remove `/' from uris" test "remove `/' from uris"
$fisher_default_host/$id[1]/$id[2] = ( $fisher_default_host/$id[1]/$id[2] = (
printf "%s\n" $id[1]/$id[2]/ | fisher --validate) printf "%s\n" $id[1]/$id[2]/ | __fisher_validate)
end end
test "remove `.git' from uris" test "remove `.git' from uris"
$fisher_default_host/$id[1]/$id[2] = ( $fisher_default_host/$id[1]/$id[2] = (
printf "%s\n" $id[1]/$id[2].git | fisher --validate) printf "%s\n" $id[1]/$id[2].git | __fisher_validate)
end end
test "file:/// uris" test "file:/// uris"
! -z (printf "%s\n" file:///$id[1]/$id[2].git | fisher --validate) ! -z (printf "%s\n" file:///$id[1]/$id[2].git | __fisher_validate)
end end
test "id/id uris" test "id/id uris"
! -z (printf "%s\n" $id[1]/$id[2].git | fisher --validate) ! -z (printf "%s\n" $id[1]/$id[2].git | __fisher_validate)
end end
test "short owner/repo uris" test "short owner/repo uris"
https://github.com/$id[1]/$id[2] = ( https://github.com/$id[1]/$id[2] = (
printf "%s\n" github/$id[1]/$id[2] | fisher --validate) printf "%s\n" github/$id[1]/$id[2] | __fisher_validate)
end end
test "short $short:owner/repo uris" test "short $short:owner/repo uris"
https://github.com/$id[1]/$id[2] = ( https://github.com/$id[1]/$id[2] = (
printf "%s\n" gh:$id[1]/$id[2] | fisher --validate) printf "%s\n" gh:$id[1]/$id[2] | __fisher_validate)
end end
test "short bitbucket urls uris" test "short bitbucket urls uris"
https://bitbucket.org/$id[1]/$id[2] = ( https://bitbucket.org/$id[1]/$id[2] = (
printf "%s\n" bb:$id[1]/$id[2] | fisher --validate) printf "%s\n" bb:$id[1]/$id[2] | __fisher_validate)
end end
test "short gitlab urls uris" test "short gitlab urls uris"
https://gitlab.com/$id[1]/$id[2] = ( https://gitlab.com/$id[1]/$id[2] = (
printf "%s\n" gl:$id[1]/$id[2] | fisher --validate) printf "%s\n" gl:$id[1]/$id[2] | __fisher_validate)
end end
test "omf: urls" test "omf: urls"
https://github.com/oh-my-fish/theme-default = ( https://github.com/oh-my-fish/theme-default = (
printf "%s\n" omf:theme-default | fisher --validate) printf "%s\n" omf:theme-default | __fisher_validate)
end end
test "omf/ urls" test "omf/ urls"
https://github.com/oh-my-fish/theme-default = ( https://github.com/oh-my-fish/theme-default = (
printf "%s\n" omf/theme-default | fisher --validate) printf "%s\n" omf/theme-default | __fisher_validate)
end end
test "urls with a period" test "urls with a period"
https://github.com/oh-my-fish/theme-cmorrell.com = ( https://github.com/oh-my-fish/theme-cmorrell.com = (
printf "%s\n" omf/theme-cmorrell.com | fisher --validate) printf "%s\n" omf/theme-cmorrell.com | __fisher_validate)
end end

@ -33,5 +33,5 @@ test "log standard error to log if <file> is given" (
end end
test "display help" test "display help"
(wait --help | xargs) = "usage: wait <commands> [--spin=<style>] [--time=<delay>] [--log=<file>] [--format=<format>] [--help] -s --spin=<style> Set spinner style -t --time=<delay> Set spinner transition time delay -l --log=<file> Output standard error to <file> -f --format=<format> Use given <format> to display spinner -h --help Show usage help" (wait -h | xargs) = "usage: wait <commands> [--spin=<style>] [--time=<delay>] [--log=<file>] [--format=<format>] [--help] -s --spin=<style> Set spinner style -t --time=<delay> Set spinner transition time delay -l --log=<file> Output standard error to <file> -f --format=<format> Use given <format> to display spinner -h --help Show usage help"
end end

Loading…
Cancel
Save