vty: fix "ui" in --help, also rename --debug-no-ui to --debug-vty

This commit is contained in:
Simon Michael 2010-05-23 22:46:04 +00:00
parent 38665bd1bc
commit 518da0c867
2 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ ui opts args l = do
-- | Update the screen, wait for the next event, repeat. -- | Update the screen, wait for the next event, repeat.
go :: AppState -> IO () go :: AppState -> IO ()
go a@AppState{av=av,aopts=opts} = do go a@AppState{av=av,aopts=opts} = do
when (notElem DebugNoUI opts) $ update av (renderScreen a) when (notElem DebugVty opts) $ update av (renderScreen a)
k <- next_event av k <- next_event av
t <- getCurrentLocalTime t <- getCurrentLocalTime
case k of case k of

View File

@ -39,7 +39,7 @@ usagehdr =
" register - show transactions as a register with running balance\n" ++ " register - show transactions as a register with running balance\n" ++
" stats - show various statistics for a ledger\n" ++ " stats - show various statistics for a ledger\n" ++
#ifdef VTY #ifdef VTY
" ui - run a simple text-based UI\n" ++ " vty - run a simple curses-style UI\n" ++
#endif #endif
#ifdef WEB #ifdef WEB
" web - run a simple web-based UI\n" ++ " web - run a simple web-based UI\n" ++
@ -89,7 +89,7 @@ options = [
,Option "v" ["verbose"] (NoArg Verbose) "show verbose test output" ,Option "v" ["verbose"] (NoArg Verbose) "show verbose test output"
,Option "" ["binary-filename"] (NoArg BinaryFilename) "show the download filename for this hledger build" ,Option "" ["binary-filename"] (NoArg BinaryFilename) "show the download filename for this hledger build"
,Option "" ["debug"] (NoArg Debug) "show extra debug output; implies verbose" ,Option "" ["debug"] (NoArg Debug) "show extra debug output; implies verbose"
,Option "" ["debug-no-ui"] (NoArg DebugNoUI) "run ui commands with no output" ,Option "" ["debug-vty"] (NoArg DebugVty) "run vty command with no vty output, showing console"
#ifdef CHART #ifdef CHART
,Option "o" ["output"] (ReqArg ChartOutput "FILE") ("chart: output filename (default: "++chartoutput++")") ,Option "o" ["output"] (ReqArg ChartOutput "FILE") ("chart: output filename (default: "++chartoutput++")")
,Option "" ["items"] (ReqArg ChartItems "N") ("chart: number of accounts to show (default: "++show chartitems++")") ,Option "" ["items"] (ReqArg ChartItems "N") ("chart: number of accounts to show (default: "++show chartitems++")")
@ -123,7 +123,7 @@ data Opt =
Version Version
| BinaryFilename | BinaryFilename
| Debug | Debug
| DebugNoUI | DebugVty
#ifdef CHART #ifdef CHART
| ChartOutput {value::String} | ChartOutput {value::String}
| ChartItems {value::String} | ChartItems {value::String}