Commit 62a45e9e authored by Bruno Pinto's avatar Bruno Pinto

Convert version and help into options

Instead of clobbering the actions with both version and help, use
options instead. They are also going to be used for subcommands (e.g.
omf list --help) once they support options.
parent 0fc2249b
...@@ -4,17 +4,19 @@ function omf.help ...@@ -4,17 +4,19 @@ function omf.help
omf "(omf::em)"action"(omf::off)" [options] omf "(omf::em)"action"(omf::off)" [options]
"(omf::dim)"Actions"(omf::off)" "(omf::dim)"Actions"(omf::off)"
"(omf::em)"l"(omf::off)"ist List local packages. "(omf::em)"l"(omf::off)"ist List local packages.
"(omf::em)"i"(omf::off)"nstall Install one or more packages. "(omf::em)"i"(omf::off)"nstall Install one or more packages.
"(omf::em)"t"(omf::off)"heme List / Use themes. "(omf::em)"t"(omf::off)"heme List / Use themes.
"(omf::em)"r"(omf::off)"emove Remove a theme or package. "(omf::em)"r"(omf::off)"emove Remove a theme or package.
"(omf::em)"u"(omf::off)"pdate Update Oh My Fish. "(omf::em)"u"(omf::off)"pdate Update Oh My Fish.
"(omf::em)"n"(omf::off)"ew Create a new package from a template. "(omf::em)"n"(omf::off)"ew Create a new package from a template.
"(omf::em)"s"(omf::off)"ubmit Submit a package to the registry. "(omf::em)"s"(omf::off)"ubmit Submit a package to the registry.
"(omf::em)"q"(omf::off)"uery Query environment variables. "(omf::em)"q"(omf::off)"uery Query environment variables.
"(omf::em)"h"(omf::off)"elp Display this help. "(omf::em)"destroy"(omf::off)" Uninstall Oh My Fish.
"(omf::em)"v"(omf::off)"ersion Display version.
"(omf::em)"destroy"(omf::off)" Uninstall Oh My Fish. "(omf::dim)"Options"(omf::off)"
"(omf::em)"--h"(omf::off)"elp Display this help.
"(omf::em)"--v"(omf::off)"ersion Display version.
For more information visit → "(omf::em)"git.io/oh-my-fish"(omf::off)\n For more information visit → "(omf::em)"git.io/oh-my-fish"(omf::off)\n
end end
...@@ -10,7 +10,7 @@ function omf.install -a type_flag name_or_url ...@@ -10,7 +10,7 @@ function omf.install -a type_flag name_or_url
echo (omf::err)"Argument to omf.install must be --theme [name|URL] or --pkg [name|URL]"(omf::off) echo (omf::err)"Argument to omf.install must be --theme [name|URL] or --pkg [name|URL]"(omf::off)
return $OMF_INVALID_ARG return $OMF_INVALID_ARG
end end
if test -e $OMF_PATH/db/$parent_path/$name_or_url if test -e $OMF_PATH/db/$parent_path/$name_or_url
set target $parent_path/$name_or_url set target $parent_path/$name_or_url
else else
......
...@@ -39,7 +39,7 @@ function omf -d "Oh My Fish" ...@@ -39,7 +39,7 @@ function omf -d "Oh My Fish"
end end
switch $argv[1] switch $argv[1]
case "v" "ver" "version" case "-v*" "--v*"
omf.version omf.version
case "q" "query" case "q" "query"
...@@ -54,7 +54,7 @@ function omf -d "Oh My Fish" ...@@ -54,7 +54,7 @@ function omf -d "Oh My Fish"
return $OMF_INVALID_ARG return $OMF_INVALID_ARG
end end
case "h" "help" case "-h*" "--h*" "help"
omf.help omf.help
case "l" "li" "lis" "lst" "list" case "l" "li" "lis" "lst" "list"
......
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