ui, web: make --man and --info work, similar to hledger

(cf #1410)
This commit is contained in:
Simon Michael 2021-03-03 05:52:57 -08:00
parent cb0526381e
commit ffb985f1a2
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,8 @@ main = do
case True of
_ | "help" `inRawOpts` rawopts -> putStr (showModeUsage uimode)
_ | "info" `inRawOpts` rawopts -> runInfoForTopic "hledger-ui" Nothing
_ | "man" `inRawOpts` rawopts -> runManForTopic "hledger-ui" Nothing
_ | "version" `inRawOpts` rawopts -> putStrLn prognameandversion
_ | "binary-filename" `inRawOpts` rawopts -> putStrLn (binaryfilename progname)
_ -> withJournalDo copts' (runBrickUi opts)

View File

@ -54,6 +54,8 @@ hledgerWebMain = do
when (debug_ > 0) $ printf "%s\n" prognameandversion >> printf "opts: %s\n" (show wopts)
if
| "help" `inRawOpts` rawopts_ -> putStr (showModeUsage webmode) >> exitSuccess
| "info" `inRawOpts` rawopts_ -> runInfoForTopic "hledger-web" Nothing
| "man" `inRawOpts` rawopts_ -> runManForTopic "hledger-web" Nothing
| "version" `inRawOpts` rawopts_ -> putStrLn prognameandversion >> exitSuccess
| "binary-filename" `inRawOpts` rawopts_ -> putStrLn (binaryfilename progname)
| "test" `inRawOpts` rawopts_ -> do