mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 10:47:29 +03:00
would like to react to --version before --help, cmdargs does it first though
This commit is contained in:
parent
870c687f31
commit
b39c0f8819
@ -82,8 +82,8 @@ main = do
|
||||
| cmd `isPrefixOf` "binaryfilename" = showModeHelpOr binaryfilenamemode $ putStrLn $ binaryfilename progname
|
||||
| otherwise = showModeHelpOr mainmode $ optserror $ "command "++cmd++" is not recognized"
|
||||
showModeHelpOr mode f = do
|
||||
when ("help" `in_` (rawopts_ opts)) $ printModeHelpAndExit mode
|
||||
when ("version" `in_` (rawopts_ opts)) $ printVersionAndExit
|
||||
when ("help" `in_` (rawopts_ opts)) $ printModeHelpAndExit mode
|
||||
f
|
||||
|
||||
{- tests:
|
||||
|
Loading…
Reference in New Issue
Block a user