Commit b4791976 authored by Stephen M. Coakley's avatar Stephen M. Coakley

Update docs and formatter

parent 45cb2b73
...@@ -2,3 +2,6 @@ Troubleshoot Oh My Fish. ...@@ -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.
...@@ -3,11 +3,12 @@ Show help text about Oh My Fish. ...@@ -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:
......
...@@ -3,8 +3,6 @@ List installed packages. ...@@ -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. ...@@ -13,4 +11,4 @@ List installed packages.
Only list themes. Only list themes.
== ALIASES == ALIASES
*omf ls* *omf l*, *omf ls*
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*
...@@ -8,4 +8,4 @@ Remove a package. ...@@ -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*
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. ...@@ -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*
...@@ -7,3 +7,6 @@ Install and list themes. ...@@ -7,3 +7,6 @@ Install and list themes.
== EXAMPLES == EXAMPLES
omf theme omf theme
omf theme l omf theme l
== ALIASES
*omf t*
...@@ -6,10 +6,9 @@ Update Oh My Fish. ...@@ -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*
...@@ -19,7 +19,7 @@ function omf.cli.help ...@@ -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 ...@@ -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 ...@@ -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
" "
......
...@@ -24,12 +24,12 @@ function omf.command -d 'Lookup OMF command by name or alias' -a name ...@@ -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 's' 'search'
echo search
case 't' 'theme' case 't' 'theme'
echo theme echo theme
case 'u' 'update' case 'u' 'up' 'update'
echo update echo update
case 's' 'search'
echo search
case 'version' case 'version'
echo version echo version
case '*' case '*'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment