Commit 3fb8b348 authored by Derek Stavis's avatar Derek Stavis Committed by Derek Stavis

cli: fix #161 by inverting test argument order

Since `test` interprets arguments starting with a single dash as
options when comparing `test -h = --help` just swap parameter
orders as in `test --help = -h`. Also related to issue #161 is the
issue from fish repository at fish-shell/fish-shell#2332
parent 69caabfe
......@@ -33,7 +33,7 @@ function omf -d "Oh My Fish"
if test (count $argv) -eq 0
omf.help "main"; and return 0
else
if test $argv[-1] = "--help" -a (count $argv) = 2
if test "--help" = "$argv[-1]" -a (count $argv) = 2
omf.help $argv[1..-2]; and return 0
end
end
......
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