Update docs and formatter

pull/502/head
Stephen M. Coakley 7 years ago
parent 45cb2b7376
commit b479197634
No known key found for this signature in database
GPG Key ID: 91B59C18494C4FC0

@ -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.

@ -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:

@ -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*

@ -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*

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

@ -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*

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

@ -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*

@ -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
"

@ -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 's' 'search'
echo search
case 't' 'theme'
echo theme
case 'u' 'update'
case 'u' 'up' 'update'
echo update
case 's' 'search'
echo search
case 'version'
echo version
case '*'

Loading…
Cancel
Save