From b479197634dacdeb092517a95fd889879d5323a8 Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Thu, 27 Apr 2017 12:00:06 -0500 Subject: [PATCH] Update docs and formatter --- docs/cli/doctor.adoc | 3 +++ docs/cli/help.adoc | 3 ++- docs/cli/list.adoc | 4 +--- docs/cli/new.adoc | 7 ++++--- docs/cli/remove.adoc | 2 +- docs/cli/search.adoc | 10 ++++++++-- docs/cli/theme.adoc | 3 +++ docs/cli/update.adoc | 7 +++---- pkg/omf/functions/cli/omf.cli.help.fish | 9 ++++----- pkg/omf/functions/core/omf.command.fish | 8 ++++---- 10 files changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/cli/doctor.adoc b/docs/cli/doctor.adoc index 156f2ae..ff6692f 100644 --- a/docs/cli/doctor.adoc +++ b/docs/cli/doctor.adoc @@ -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. diff --git a/docs/cli/help.adoc b/docs/cli/help.adoc index d5fe8ba..7dc9ab9 100644 --- a/docs/cli/help.adoc +++ b/docs/cli/help.adoc @@ -3,11 +3,12 @@ Show help text about Oh My Fish. == USAGE omf help [] omf --help + omf -h == DESCRIPTION If no arguments are given, the usage guide for the *omf* command will be printed to standard output. -If is specified, the usage guide for will be displayed. If is an alias it will be translated into the corresponding command. +If is specified, the usage guide for will be displayed. If is an alias, it will be translated into the corresponding command. == EXAMPLES To display the text you are currently reading, you can run: diff --git a/docs/cli/list.adoc b/docs/cli/list.adoc index c814bf0..cb96d05 100644 --- a/docs/cli/list.adoc +++ b/docs/cli/list.adoc @@ -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* diff --git a/docs/cli/new.adoc b/docs/cli/new.adoc index 8e47787..d5f86b7 100644 --- a/docs/cli/new.adoc +++ b/docs/cli/new.adoc @@ -1,10 +1,11 @@ Create a new package from a template. == USAGE - omf new (_pkg_ | _theme_) Create a new package from a template - -== OPTIONS + omf new (_pkg_ | _theme_) == EXAMPLES omf new pkg mypkg omf new theme mytheme + +== ALIASES +*omf n* diff --git a/docs/cli/remove.adoc b/docs/cli/remove.adoc index 93a5163..dacd0d6 100644 --- a/docs/cli/remove.adoc +++ b/docs/cli/remove.adoc @@ -8,4 +8,4 @@ Remove a package. omf remove l == ALIASES -*omf rm*, *omf uninstall* +*omf r*, *omf rm*, *omf uninstall* diff --git a/docs/cli/search.adoc b/docs/cli/search.adoc index a34a7a9..8f707da 100644 --- a/docs/cli/search.adoc +++ b/docs/cli/search.adoc @@ -1,7 +1,10 @@ Search for a plugin or theme. == USAGE - omf search [options] + omf search [options] + +== DESCRIPTION + Search all installed package repositories for plugins and themes whose name or description matches the regular expression . 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* diff --git a/docs/cli/theme.adoc b/docs/cli/theme.adoc index aafa7d9..3d96f13 100644 --- a/docs/cli/theme.adoc +++ b/docs/cli/theme.adoc @@ -7,3 +7,6 @@ Install and list themes. == EXAMPLES omf theme omf theme l + +== ALIASES +*omf t* diff --git a/docs/cli/update.adoc b/docs/cli/update.adoc index 54d2a3f..7ff1909 100644 --- a/docs/cli/update.adoc +++ b/docs/cli/update.adoc @@ -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* diff --git a/pkg/omf/functions/cli/omf.cli.help.fish b/pkg/omf/functions/cli/omf.cli.help.fish index d8d775a..6d62fc2 100644 --- a/pkg/omf/functions/cli/omf.cli.help.fish +++ b/pkg/omf/functions/cli/omf.cli.help.fish @@ -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 " diff --git a/pkg/omf/functions/core/omf.command.fish b/pkg/omf/functions/core/omf.command.fish index d63e3c9..97eecc2 100644 --- a/pkg/omf/functions/core/omf.command.fish +++ b/pkg/omf/functions/core/omf.command.fish @@ -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 '*'