fisher/man/man1/fisher-search.1
Jorge Bucaran ab43e5f804
Introducting Fisherman's official website:
www.fisherman.sh

Still a WIP. Powered by Jekyll and hosted by GitHub
pages.

* Refactor fisher install / fisher uninstall by
extracting the logic to enable / disable plugins
into __fisher_plugin. The algorithm to enable/disable
plugins is essentially the same. The only difference
is enable, copies/symlinks files and disable removes
them from $fisher_config/.... Closes #45.

* Add support for legacy oh-my-fish! plugins using
.load initialization files. Closes #35.

* Add support for Tackle Fish framework initialization
modules. Closes #35.

* Add support for plugins that share scripts in
languages like Python or Perl. For example
oh-my-fish/plugin-vi-mode assumes there is a
vi-mode-impl.py file in the same path of the running
script. This opens the door for including code
snippets in other languages.

* Any files inside a share directory, except for *.md
or *.fish files, are copied to $fisher_config/functions.
This allows you to run legacy plugins that retrieve
the currently running script path with (dirname
(status -f)) out of the box.

* A cleaner alternative is using the new $fisher_share
variable like this: python
$fisher_share/my_plugin_script.py.

* $fisher_share points to $fisher_config/share by
default, but you may change this in your user
config.fish. This path contains copies (or symbolic
links) to the same script files copied to
$fisher_config/functions.

* Introduce the $fisher_share_extensions variable to
let you customize what extensions Fisherman is aware
of. Only extensions in this array will be processed
during the install process. The default is py rb php
pl awk sed.

* .fish and .md extensions are always ignored.

* Remove ad-hoc debug d function created by mistake
in the Fisherman config.fish file. Closes #34.

* Remove almost useless fisher --alias. You can still
create aliases using $fisher_alias. It's difficult
to add auto-complete to this feature, and even if
we do so, it is slow.

* Fix bug introduced in the previous release caused
by swapping the lines that calculate the index of
the current plugin being installed/updated/uninstalled
and the line that displays the value, causing the
CLI to show incorrect values. Closes #36. Thanks
@kballard

* Add cache, enabled and disabled options to fisher
--list. Now you can type fisher -l enabled to get a
list of what plugins are currently enabled.

* Add new $fisher_plugins universal variable to keep
track of what plugins are enabled / disabled.

* Update completions after a plugin is installed,
updated or uninstalled.

* Improve autocomplete speed by removing the descriptions
from plugins installed with custom URLs.

* fisher --list displays nothing and returns 1 when
there are no plugins installed. Closes #38.

* fisher uninstall does not attempt to uninstall plugins
already disabled by looking at the $fisher_plugins
array. --force will bypass this. Closes #40
2016-01-12 05:00:34 +09:00

228 lines
4.9 KiB
Groff

.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "FISHER\-SEARCH" "1" "January 2016" "" "fisherman"
.
.SH "NAME"
\fBfisher\-search\fR \- Search Plugin Index
.
.SH "SYNOPSIS"
fisher \fBsearch\fR [\fIplugins\fR \.\.\.]
.
.br
fisher \fBsearch\fR [\fB\-\-select\fR=\fIall\fR|\fIcache\fR|\fIremote\fR]
.
.br
fisher \fBsearch\fR [\fB\-\-field\fR=\fIname\fR|\fIurl\fR|\fIinfo\fR|\fItag\fR|\fIauthor\fR]
.
.br
fisher \fBsearch\fR [\fB\-\-\fR\fIfield[\fR=\fImatch\fR]]
.
.br
fisher \fBsearch\fR [\fB\-\-\fR\fIfield\fR~\fB/\fR\fIregex\fR\fB/\fR]
.
.br
fisher \fBsearch\fR [\fB\-\-query\fR=\fIfield\fR[\fB&&\fR,\fB||\fR]\fIfield\fR\.\.\.]
.
.br
fisher \fBsearch\fR [\fB\-\-and\fR] [\fB\-\-or\fR] [\fB\-\-quiet\fR] [\fB\-\-help\fR]
.
.br
.
.SH "USAGE"
fisher \fBsearch\fR \fIplugin\fR
.
.br
fisher \fBsearch\fR \fIowner/repo\fR
.
.br
.
.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 \fIIndex\fR in \fBfisher help tour\fR\.
.
.P
A copy of the index is downloaded every time a search query happens, keeping the index up to date all the time\.
.
.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\.
.
.P
For example:
.
.IP "" 4
.
.nf
name
url
info
tag1 tag2 tag3 \.\.\.
author
.
.fi
.
.IP "" 0
.
.P
See \fIOutput\fR for more information\.
.
.SH "OPTIONS"
.
.TP
\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\.
.
.TP
\fB\-f \-\-field=name|url|info|tag|author\fR
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
\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 \-\-select=\fIfield\fR\. Use \fB!=\fR to negate the query\.
.
.TP
\fB\-\-field[~/regex/]\fR
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
\fB\-a \-\-and\fR
Join query with the logical AND operator\.
.
.TP
\fB\-o \-\-or\fR
Join query with the logical OR operator\. This the default operator for each query\.
.
.TP
\fB\-Q \-\-query=field[&&,||]field\.\.\.\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
\fB\-q \-\-quiet\fR
Enable quiet mode\.
.
.TP
\fB\-h \-\-search\fR
Show help\.
.
.SH "OUTPUT"
The default behavior is to print the result set to standard output in their original format\.
.
.IP "" 4
.
.nf
fisher search shark
shark
https://github\.com/bucaran/shark
Sparkline Generator
chart tool
bucaran
.
.fi
.
.IP "" 0
.
.P
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
.
.nf
fisher search shark \-\-name \-\-url
shark;https://github\.com/bucaran/shark
.
.fi
.
.IP "" 0
.
.P
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"
.
.IP "\(bu" 4
Display all plugins by name and format into multiple columns\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher search \-\-name | column
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Display all plugins by URL, sans \fIhttps://github\.com/\fR and format into multiple columns\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher search \-\-field=url \-\-select=all | sed \'s|https://github\.com/||\' | column
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Display all remote plugins by name tagged as \fIa\fR or \fIb\fR\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher search \-\-select=remote \-\-name \-\-tag=github \-\-or \-\-tag=tool
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Search plugins from a list of one or more urls and / or names and display their authors\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher search $urls $names \-\-url
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
Search all plugins in the cache whose name does not start with the letter \fBs\fR\.
.
.IP "" 0
.
.IP "" 4
.
.nf
fisher search \-\-select=cache \-\-name~/^[^s]/
.
.fi
.
.IP "" 0
.
.SH "SEE ALSO"
fisher(1)
.
.br
fisher help plugins
.
.br