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 == USAGE
omf doctor 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 == USAGE
omf help [<command>] omf help [<command>]
omf <command> --help omf <command> --help
omf <command> -h
== DESCRIPTION == DESCRIPTION
If no arguments are given, the usage guide for the *omf* command will be printed to standard output. 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 == EXAMPLES
To display the text you are currently reading, you can run: To display the text you are currently reading, you can run:

View File

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

View File

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

View File

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

View File

@ -1,7 +1,10 @@
Search for a plugin or theme. Search for a plugin or theme.
== USAGE == 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 == OPTIONS
-p, --plugin:: -p, --plugin::
@ -13,4 +16,7 @@ Search for a plugin or theme.
== EXAMPLES == EXAMPLES
omf search -p nvm omf search -p nvm
omf search -t bobthefish omf search -t bobthefish
omf search vi omf search '^gi.*$'
== ALIASES
*omf s*

View File

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

View File

@ -6,10 +6,9 @@ Update Oh My Fish.
== DESCRIPTION == DESCRIPTION
Update Oh My Fish, all package repositories, and all installed packages. Update Oh My Fish, all package repositories, and all installed packages.
* When called without arguments, update core and all installed packages. * 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. * 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 * 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.
update. You may still include "omf" in the list to update the core as well.
== ALIASES == ALIASES
*omf u*, *omf up* *omf u*, *omf up*

View File

@ -19,7 +19,7 @@ function omf.cli.help
set -l u (set_color --underline ^ /dev/null) set -l u (set_color --underline ^ /dev/null)
# Format the help document for the terminal. # Format the help document for the terminal.
fold -s $doc | sed -e " fold -s -w 78 $doc | sed -e "
# Strip cross references. # Strip cross references.
s/<<[^,]*,\([^>]*\)>>/\1/g s/<<[^,]*,\([^>]*\)>>/\1/g
@ -36,9 +36,11 @@ function omf.cli.help
# Headers. # Headers.
s/^==* \(.*\)/$b\1$r/ 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
s/``\([^`]*\)``/$c\1$r/g
s/`\([^`]*\)`/$c\1$r/g
# Style italics as underline. # Style italics as underline.
s/__\([^_]*\)__/$u\1$r/g s/__\([^_]*\)__/$u\1$r/g
@ -47,9 +49,6 @@ function omf.cli.help
# Underline links. # Underline links.
s/\w\w*:\S\S*/$u&$r/g 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. # Underline variable names in angle brackets.
s/<[^>]*>/$u&$r/g 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 echo remove
case 'repo' 'repositories' case 'repo' 'repositories'
echo repositories echo repositories
case 't' 'theme'
echo theme
case 'u' 'update'
echo update
case 's' 'search' case 's' 'search'
echo search echo search
case 't' 'theme'
echo theme
case 'u' 'up' 'update'
echo update
case 'version' case 'version'
echo version echo version
case '*' case '*'