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
...@@ -12,9 +12,11 @@ function omf.help ...@@ -12,9 +12,11 @@ function omf.help
"(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)"v"(omf::off)"ersion Display version.
"(omf::em)"destroy"(omf::off)" Uninstall Oh My Fish. "(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
...@@ -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