Ahoy! Fisherman 1.3.0

* Fix bug in fisher_config_color_reset not declaring path variable.
* Silence Git checkout standard error to prevent update failures in some edge cases.
* Revise and correct errors in the documentation and README.
* Add more instrumentation to fisher_plugin_disable.
* Minor doc updates.
pull/445/head
Jorge Bucaran 8 years ago
parent 093ad78a04
commit ed335bf270
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30

@ -1,11 +1,17 @@
# Change Log
## [1.3.0][v130] - 2016-03-11
* Fix bug in fisher_config_color_reset not declaring path variable.
* Silence Git checkout standard error to prevent update failures in some edge cases.
* Revise and correct errors in the documentation and README.
* Add more instrumentation to fisher_plugin_disable.
* Minor doc updates.
## [1.3.0][v130] - 2016-03-09
* Merge tutorial and CLI documentation into one document.
* Update README with new simplified documentation.
* Tweak fisher help menu to highlight command aliases.
## [1.2.0][v120] - 2016-03-08
@ -359,6 +365,7 @@
<!-- Links -->
[v131]: https://github.com/fisherman/fisherman/releases/tag/1.3.1
[v130]: https://github.com/fisherman/fisherman/releases/tag/1.3.0
[v120]: https://github.com/fisherman/fisherman/releases/tag/1.2.0
[v110]: https://github.com/fisherman/fisherman/releases/tag/1.1.0

@ -256,7 +256,14 @@ git push origin master
## Plugins
Plugins can be utilities, prompts, commands or snippets.
Plugins can be utilities, prompts, commands or snippets. To create a plugin from a template, install the new command.
```
fisher install new
fisher new plugin < meta.yml
```
See the documentation of new for details.
### Utilities

@ -1,10 +1,10 @@
function __fisher_config_color_reset
function __fisher_config_color_reset -a path
if test ! -f "$path"
set -U fish_color_normal normal
set -U fish_color_command 005fd7 purple
set -U fish_color_param 00afff cyan
set -U fish_color_redirection normal
set -U fish_color_comment red
set -U fish_color_redirection 005fd7
set -U fish_color_comment 600
set -U fish_color_error red --bold
set -U fish_color_escape cyan
set -U fish_color_operator cyan
@ -32,30 +32,32 @@ function __fisher_config_color_reset
read -laz fish_colors < $path
set -U fish_color_normal (echo $fish_colors[1] | tr " " \n)
set -U fish_color_command (echo $fish_colors[2] | tr " " \n)
set -U fish_color_param (echo $fish_colors[3] | tr " " \n)
set -U fish_color_redirection (echo $fish_colors[4] | tr " " \n)
set -U fish_color_comment (echo $fish_colors[5] | tr " " \n)
set -U fish_color_error (echo $fish_colors[6] | tr " " \n)
set -U fish_color_escape (echo $fish_colors[7] | tr " " \n)
set -U fish_color_operator (echo $fish_colors[8] | tr " " \n)
set -U fish_color_end (echo $fish_colors[9] | tr " " \n)
set -U fish_color_quote (echo $fish_colors[10] | tr " " \n)
set -U fish_color_autosuggestion (echo $fish_colors[11] | tr " " \n)
set -U fish_color_user (echo $fish_colors[12] | tr " " \n)
set -U fish_color_valid_path (echo $fish_colors[13] | tr " " \n)
set -U fish_color_cwd (echo $fish_colors[14] | tr " " \n)
set -U fish_color_cwd_root (echo $fish_colors[15] | tr " " \n)
set -U fish_color_match (echo $fish_colors[16] | tr " " \n)
set -U fish_color_search_match (echo $fish_colors[17] | tr " " \n)
set -U fish_color_selection (echo $fish_colors[18] | tr " " \n)
set -U fish_pager_color_prefix (echo $fish_colors[19] | tr " " \n)
set -U fish_pager_color_completion (echo $fish_colors[20] | tr " " \n)
set -U fish_pager_color_description (echo $fish_colors[21] | tr " " \n)
set -U fish_pager_color_progress (echo $fish_colors[22] | tr " " \n)
set -U fish_color_history_current (echo $fish_colors[23] | tr " " \n)
set -U fish_color_host (echo $fish_colors[24] | tr " " \n)
set fish_colors[25] ""
set -U fish_color_normal (echo "$fish_colors[1]" | tr " " \n)
set -U fish_color_command (echo "$fish_colors[2]" | tr " " \n)
set -U fish_color_param (echo "$fish_colors[3]" | tr " " \n)
set -U fish_color_redirection (echo "$fish_colors[4]" | tr " " \n)
set -U fish_color_comment (echo "$fish_colors[5]" | tr " " \n)
set -U fish_color_error (echo "$fish_colors[6]" | tr " " \n)
set -U fish_color_escape (echo "$fish_colors[7]" | tr " " \n)
set -U fish_color_operator (echo "$fish_colors[8]" | tr " " \n)
set -U fish_color_end (echo "$fish_colors[9]" | tr " " \n)
set -U fish_color_quote (echo "$fish_colors[10]" | tr " " \n)
set -U fish_color_autosuggestion (echo "$fish_colors[11]" | tr " " \n)
set -U fish_color_user (echo "$fish_colors[12]" | tr " " \n)
set -U fish_color_valid_path (echo "$fish_colors[13]" | tr " " \n)
set -U fish_color_cwd (echo "$fish_colors[14]" | tr " " \n)
set -U fish_color_cwd_root (echo "$fish_colors[15]" | tr " " \n)
set -U fish_color_match (echo "$fish_colors[16]" | tr " " \n)
set -U fish_color_search_match (echo "$fish_colors[17]" | tr " " \n)
set -U fish_color_selection (echo "$fish_colors[18]" | tr " " \n)
set -U fish_pager_color_prefix (echo "$fish_colors[19]" | tr " " \n)
set -U fish_pager_color_completion (echo "$fish_colors[20]" | tr " " \n)
set -U fish_pager_color_description (echo "$fish_colors[21]" | tr " " \n)
set -U fish_pager_color_progress (echo "$fish_colors[22]" | tr " " \n)
set -U fish_color_history_current (echo "$fish_colors[23]" | tr " " \n)
set -U fish_color_host (echo "$fish_colors[24]" | tr " " \n)
rm -f $path
end

@ -7,21 +7,21 @@ function __fisher_path_update -a path
return 1
end
git stash --quiet ^ /dev/null
git stash --quiet ^ /dev/null
git checkout master --quiet ^ /dev/null
if not git pull --rebase origin master --quiet
git rebase --abort --quiet
git fetch origin master --quiet
git reset --hard FETCH_HEAD --quiet
git clean -d --force --quiet
if not git pull --quiet --rebase origin master
git rebase --quiet --abort
git fetch --quiet origin master
git reset --quiet --hard FETCH_HEAD
git clean --quiet -d --force
end ^ /dev/null
if test ! -z "$branch"
git checkout "$branch" --quiet
git checkout "$branch" --quiet ^ /dev/null
end
git stash apply --quiet ^ /dev/null
popd
end

@ -24,12 +24,19 @@ function __fisher_plugin_disable -a plugin path option
end
if test -s $fisher_file
debug "File remove %s" "$plugin"
set -l key
__fisher_file_remove (
if not fisher_search --name=$plugin --name --index=$fisher_cache/.index
__fisher_url_from_path $path
end
) $fisher_file > /dev/null
if not set key (fisher_search --name=$plugin --name --index=$fisher_cache/.index)
debug "Path $path"
set key (__fisher_url_from_path $path)
end
debug "fishfile remove %s start" "$key"
if set key (__fisher_file_remove "$key" "$fisher_file")
debug "fishfile remove %s ok" "$key"
else
debug "fishfile remove %s fail" "$key"
end
end
end

@ -56,7 +56,7 @@ function fisher -d "Fish plugin manager"
case help
printf "Usage: fisher <command> [<options>] [--help] [--version]\n\n"
set -l color (set_color $fish_color_command -u)
set -l color (set_color -u)
set -l color_normal (set_color normal)
printf "Commands:\n"

@ -1,4 +1,4 @@
function fisher_help -d "Show help"
function fisher_help -d "Show command help"
if not set -q argv[1]
man fisher
return

@ -4,7 +4,7 @@
.TH "FISHER\-HELP" "1" "March 2016" "" "fisherman"
.
.SH "NAME"
\fBfisher\-help\fR \- Show help about Fisherman
\fBfisher\-help\fR \- Show command help
.
.SH "SYNOPSIS"
fisher help [\fIcommand\fR] [\-\-help]
@ -17,10 +17,10 @@ fisher help \fIcommand\fR
.br
.
.SH "DESCRIPTION"
Help displays \fIcommand\fR documentation, usage, guides and tutorials\.
Help displays \fIcommand\fR documentation\.
.
.P
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 pages and add them to your project under the corresponding man/man% directory\.
.
.IP "" 4
.
@ -37,7 +37,7 @@ my_plugin
.IP "" 0
.
.P
Help for my_plugin is available via man(1)\. To add documentation to a fisher command, prepend the keyword fisher\- to the man file, e\.g\., fisher\-my\-command\.1\. This will teach Fisherman how to access the man page using fisher help my\-command\.
To add documentation to a fisher command, prepend the keyword fisher\- to the man file, e\.g\., fisher\-my\-command\.1\. This will teach Fisherman how to access the man page using \fBfisher help my\-command\fR\.
.
.P
There are utilities that can help you generate man pages from other text formats, such as Markdown\. For example pandoc(1) or ronn(1)\.

@ -1,5 +1,5 @@
fisher-help(1) -- Show help about Fisherman
===========================================
fisher-help(1) -- Show command help
===================================
## SYNOPSIS
@ -11,9 +11,9 @@ fisher help *command*<br>
## DESCRIPTION
Help displays *command* documentation, usage, guides and tutorials.
Help displays *command* documentation.
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 pages and add them to your project under the corresponding man/man% directory.
```
my_plugin
@ -23,7 +23,7 @@ my_plugin
`-- my_plugin.1
```
Help for my_plugin is available via man(1). To add documentation to a fisher command, prepend the keyword fisher- to the man file, e.g., fisher-my-command.1. This will teach Fisherman how to access the man page using fisher help my-command.
To add documentation to a fisher command, prepend the keyword fisher- to the man file, e.g., fisher-my-command.1. This will teach Fisherman how to access the man page using `fisher help my-command`.
There are utilities that can help you generate man pages from other text formats, such as Markdown. For example pandoc(1) or ronn(1).

@ -448,7 +448,21 @@ $fisher_alias \fIcommand\fR=\fIalias\fR \.\.\.
Use this variable to create aliases of Fisherman commands\.
.
.SH "PLUGINS"
Plugins can be utilities, prompts, commands or snippets\.
Plugins can be utilities, prompts, commands or snippets\. To create a plugin from a template, install the new command\.
.
.IP "" 4
.
.nf
fisher install new
fisher new plugin < meta\.yml
.
.fi
.
.IP "" 0
.
.P
See the documentation of new for details\.
.
.SS "UTILITIES"
Utilities are plugins that define one or more functions\.

@ -270,7 +270,14 @@ This file is automatically updated as you install and uninstall plugins.
## PLUGINS
Plugins can be utilities, prompts, commands or snippets.
Plugins can be utilities, prompts, commands or snippets. To create a plugin from a template, install the new command.
```
fisher install new
fisher new plugin < meta.yml
```
See the documentation of new for details.
### UTILITIES

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GETOPTS" "1" "February 2016" "" "fisherman"
.TH "GETOPTS" "1" "March 2016" "" "fisherman"
.
.SH "NAME"
\fBgetopts\fR \- Command line options parser
@ -15,7 +15,7 @@ getopts \fIoptions\fR \.\.\.
\fBGetopts\fR is a command line options parser for fish\.
.
.SH "USAGE"
Study the output of the following example
Study the output of getopts in the following example
.
.IP "" 4
.
@ -41,10 +41,7 @@ _ baz
.IP "" 0
.
.P
The items on the left are the option flags\. The items on the right are the option values\. The underscore \fB_\fR character is the default \fIkey\fR for bare arguments\.
.
.P
Use read(1) to process the generated stream and switch(1) to match patterns
The items on the left are the command option \fIkeys\fR\. The items on the right are the option \fIvalues\fR\. The underscore \fB_\fR character is the default key for bare arguments\.
.
.IP "" 4
.

@ -11,7 +11,7 @@ getopts *options* ...<br>
## USAGE
Study the output of the following example
Study the output of getopts in the following example
```
getopts -ab1 --foo=bar baz
@ -24,9 +24,7 @@ foo bar
_ baz
```
The items on the left are the option flags. The items on the right are the option values. The underscore `_` character is the default *key* for bare arguments.
Use read(1) to process the generated stream and switch(1) to match patterns
The items on the left are the command option *keys*. The items on the right are the option *values*. The underscore `_` character is the default key for bare arguments.
```
getopts -ab1 --foo=bar baz | while read -l key option

Loading…
Cancel
Save