Update docs and formatter

This commit is contained in:
Stephen M. Coakley 2017-04-27 12:00:06 -05:00
parent 45cb2b7376
commit b479197634
No known key found for this signature in database
GPG Key ID: 91B59C18494C4FC0
10 changed files with 33 additions and 23 deletions

View File

@ -2,3 +2,6 @@ Troubleshoot Oh My Fish.
== USAGE
omf doctor
== DESCRIPTION
Checks your environment and Oh My Fish install for any potential or common problems.

View File

@ -3,11 +3,12 @@ Show help text about Oh My Fish.
== USAGE
omf help [<command>]
omf <command> --help
omf <command> -h
== DESCRIPTION
If no arguments are given, the usage guide for the *omf* command will be printed to standard output.
If <command> is specified, the usage guide for <command> will be displayed. If <command> is an alias it will be translated into the corresponding command.
If <command> is specified, the usage guide for <command> will be displayed. If <command> is an alias, it will be translated into the corresponding command.
== EXAMPLES
To display the text you are currently reading, you can run:

View File

@ -3,8 +3,6 @@ List installed packages.
== USAGE
omf list [options]
== DESCRIPTION
== OPTIONS
-p, --plugin::
Only list plugins.
@ -13,4 +11,4 @@ List installed packages.
Only list themes.
== ALIASES
*omf ls*
*omf l*, *omf ls*

View File

@ -1,10 +1,11 @@
Create a new package from a template.
== USAGE
omf new (_pkg_ | _theme_) <name> Create a new package from a template
== OPTIONS
omf new (_pkg_ | _theme_) <name>
== EXAMPLES
omf new pkg mypkg
omf new theme mytheme
== ALIASES
*omf n*

View File

@ -8,4 +8,4 @@ Remove a package.
omf remove l
== ALIASES
*omf rm*, *omf uninstall*
*omf r*, *omf rm*, *omf uninstall*

View File

@ -1,7 +1,10 @@
Search for a plugin or theme.
== USAGE
omf search [options] <name>
omf search [options] <pattern>
== DESCRIPTION
Search all installed package repositories for plugins and themes whose name or description matches the regular expression <pattern>. Patterns use the POSIX ERE syntax.
== OPTIONS
-p, --plugin::
@ -13,4 +16,7 @@ Search for a plugin or theme.
== EXAMPLES
omf search -p nvm
omf search -t bobthefish
omf search vi
omf search '^gi.*$'
== ALIASES
*omf s*

View File

@ -7,3 +7,6 @@ Install and list themes.
== EXAMPLES
omf theme
omf theme l
== ALIASES
*omf t*

View File

@ -6,10 +6,9 @@ Update Oh My Fish.
== DESCRIPTION
Update Oh My Fish, all package repositories, and all installed packages.
* When called without arguments, update core and all installed packages.
* You can choose to update only the core, by running omf update omf.
* For selective package update, list only the names of packages you wish to
update. You may still include "omf" in the list to update the core as well.
* When called without arguments, updates the core framework and all installed packages.
* You can choose to update only the core, by running `omf update omf`.
* For selective package update, list only the names of packages you wish to update. You may still include "omf" in the list to update the core as well.
== ALIASES
*omf u*, *omf up*

View File

@ -19,7 +19,7 @@ function omf.cli.help
set -l u (set_color --underline ^ /dev/null)
# Format the help document for the terminal.
fold -s $doc | sed -e "
fold -s -w 78 $doc | sed -e "
# Strip cross references.
s/<<[^,]*,\([^>]*\)>>/\1/g
@ -36,9 +36,11 @@ function omf.cli.help
# Headers.
s/^==* \(.*\)/$b\1$r/
# Bold.
# Highlight bold and monospace text.
s/\*\*\([^\*]*\)\*\*/$c\1$r/g
s/\*\([^\*]*\)\*/$c\1$r/g
s/``\([^`]*\)``/$c\1$r/g
s/`\([^`]*\)`/$c\1$r/g
# Style italics as underline.
s/__\([^_]*\)__/$u\1$r/g
@ -47,9 +49,6 @@ function omf.cli.help
# Underline links.
s/\w\w*:\S\S*/$u&$r/g
# Since we're in the terminal anyway, just strip monospace backticks.
s/`\([^`]*\)`/\1/g
# Underline variable names in angle brackets.
s/<[^>]*>/$u&$r/g
"

View File

@ -24,12 +24,12 @@ function omf.command -d 'Lookup OMF command by name or alias' -a name
echo remove
case 'repo' 'repositories'
echo repositories
case 't' 'theme'
echo theme
case 'u' 'update'
echo update
case 's' 'search'
echo search
case 't' 'theme'
echo theme
case 'u' 'up' 'update'
echo update
case 'version'
echo version
case '*'