hledger-ui 1.29.2 → 1.30
raw patch · 15 files changed
+748/−830 lines, 15 filesdep ~hledgerdep ~hledger-libdep ~megaparsec
Dependency ranges changed: hledger, hledger-lib, megaparsec
Files
- CHANGES.md +35/−0
- Hledger/UI/AccountsScreen.hs +6/−5
- Hledger/UI/CashScreen.hs +29/−0
- Hledger/UI/Main.hs +26/−28
- Hledger/UI/MenuScreen.hs +5/−3
- Hledger/UI/RegisterScreen.hs +6/−6
- Hledger/UI/TransactionScreen.hs +15/−12
- Hledger/UI/UIOptions.hs +3/−3
- Hledger/UI/UIScreens.hs +43/−11
- Hledger/UI/UITypes.hs +3/−0
- Hledger/UI/UIUtils.hs +5/−3
- hledger-ui.1 +144/−230
- hledger-ui.cabal +5/−4
- hledger-ui.info +206/−241
- hledger-ui.txt +217/−284
CHANGES.md view
@@ -5,9 +5,44 @@ | |_| | | \__,_|_| +Breaking changes++Features++Improvements++Fixes++Docs++API+ --> User-visible changes in hledger-ui. See also the hledger changelog.++# 1.30 2023-06-01++Features++- A "Cash accounts" screen has been added, showing+ accounts of the `Cash` type.++Improvements++- The top-level menu screen is now the default screen.+ Power users can use the `--cash`/`--bs`/`--is`/`--all`+ flags to start up in another screen.++- "All accounts" screen has been moved to the bottom of the list.++- Screens' help footers have been improved.++Docs++- The transaction screen's inability to update is now noted.++- Miscellaneous manual cleanups. # 1.29.2 2023-04-07
Hledger/UI/AccountsScreen.hs view
@@ -138,8 +138,8 @@ _ -> quickhelp where quickhelp = borderKeysStr' [- ("?", str "help")- -- ,("RIGHT", str "register")+ ("LEFT", str "back")+ -- ,("RIGHT", str "register") ,("t", renderToggle (tree_ ropts) "list" "tree") -- ,("t", str "tree") -- ,("l", str "list")@@ -152,9 +152,10 @@ --,("/", "filter") --,("DEL", "unfilter") --,("ESC", "cancel/top")- ,("a", str "add")- -- ,("g", "reload")- ,("q", str "quit")+ -- ,("a", str "add")+ -- ,("g", "reload")+ ,("?", str "help")+ -- ,("q", str "quit") ] asDrawItem :: (Int,Int) -> Bool -> AccountsScreenItem -> Widget Name
+ Hledger/UI/CashScreen.hs view
@@ -0,0 +1,29 @@+-- The cash accounts screen, like the accounts screen but restricted to cash accounts.++module Hledger.UI.CashScreen+ (csNew+ ,csUpdate+ ,csDraw+ ,csHandle+ )+where++import Brick++import Hledger+import Hledger.Cli hiding (mode, progname, prognameandversion)+import Hledger.UI.UIOptions+import Hledger.UI.UITypes+import Hledger.UI.UIUtils+import Hledger.UI.UIScreens+import Hledger.UI.AccountsScreen (asHandle, asDrawHelper)+++csDraw :: UIState -> [Widget Name]+csDraw ui = dbgui "csDraw" $ asDrawHelper ui ropts' scrname+ where+ scrname = "cash balances"+ ropts' = (_rsReportOpts $ reportspec_ $ uoCliOpts $ aopts ui){balanceaccum_=Historical}++csHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()+csHandle = asHandle . dbgui "csHandle"
Hledger/UI/Main.hs view
@@ -18,7 +18,6 @@ import Data.Function ((&)) import Data.List (find) import Data.List.Extra (nubSort)-import qualified Data.Map as M (elems) import Data.Maybe (fromMaybe) import qualified Data.Text as T import Graphics.Vty (mkVty, Mode (Mouse), Vty (outputIface), Output (setMode))@@ -39,11 +38,13 @@ import Hledger.UI.UIUtils (dbguiEv, showScreenStack, showScreenSelection) import Hledger.UI.MenuScreen import Hledger.UI.AccountsScreen+import Hledger.UI.CashScreen import Hledger.UI.BalancesheetScreen import Hledger.UI.IncomestatementScreen import Hledger.UI.RegisterScreen import Hledger.UI.TransactionScreen import Hledger.UI.ErrorScreen+import Hledger.UI.UIScreens ----------------------------------------------------------------------@@ -71,11 +72,11 @@ let copts' = copts{inputopts_=iopts{forecast_=forecast_ iopts <|> Just nulldatespan}} case True of- _ | "help" `inRawOpts` rawopts -> pager (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)+ _ | boolopt "help" rawopts -> pager (showModeUsage uimode)+ _ | boolopt "info" rawopts -> runInfoForTopic "hledger-ui" Nothing+ _ | boolopt "man" rawopts -> runManForTopic "hledger-ui" Nothing+ _ | boolopt "version" rawopts -> putStrLn prognameandversion+ -- _ | boolopt "binary-filename" rawopts -> putStrLn (binaryfilename progname) _ -> withJournalDo copts' (runBrickUi opts) runBrickUi :: UIOpts -> Journal -> IO ()@@ -143,26 +144,25 @@ where filtered = filterQuery (\x -> not $ queryIsDepth x || queryIsDate x) -- Choose the initial screen to display.- -- We like to show the balance sheet accounts screen by default,- -- but that can change eg if we can't detect any accounts for it,- -- or if an account query has been provided at startup,- -- or if a specific screen has been requested by command line flag.- -- Whichever is the initial screen, we also set up a stack of previous screens,- -- as if you had navigated down to it from the top.- -- (remember, the previous screens list is ordered nearest/lowest first)+ -- We also set up a stack of previous screens, as if you had navigated down to it from the top.+ -- Note the previous screens list is ordered nearest-first, with the top-most (menu) screen last.+ -- Keep all of this synced with msNew. rawopts = rawopts_ $ uoCliOpts $ uopts (prevscrs, currscr) = dbg1With (showScreenStack "initial" showScreenSelection . uncurry2 (uiState defuiopts nulljournal)) $ if- | boolopt "menu" rawopts -> ([], menuscr)- | boolopt "all" rawopts -> ([msSetSelectedScreen 0 menuscr], allacctsscr)- | boolopt "bs" rawopts -> ([menuscr], bsacctsscr)- | boolopt "is" rawopts -> ([msSetSelectedScreen 2 menuscr], isacctsscr)+ -- An accounts screen is specified. Its previous screen will be the menu screen with it selected.+ | boolopt "cash" rawopts -> ([msSetSelectedScreen csItemIndex menuscr], csacctsscr)+ | boolopt "bs" rawopts -> ([msSetSelectedScreen bsItemIndex menuscr], bsacctsscr)+ | boolopt "is" rawopts -> ([msSetSelectedScreen isItemIndex menuscr], isacctsscr)+ | boolopt "all" rawopts -> ([msSetSelectedScreen asItemIndex menuscr], allacctsscr) - -- With --register=ACCT, the initial screen stack is:- -- menu screen, with ACCTSSCR selected- -- ACCTSSCR (the accounts screen containing ACCT), with ACCT selected- -- register screen for ACCT+ -- A register screen is specified with --register=ACCT. The initial screen stack will be:+ --+ -- menu screen, with ACCTSSCR selected+ -- ACCTSSCR (the accounts screen containing ACCT), with ACCT selected+ -- register screen for ACCT+ -- | Just apat <- uoRegister uopts -> let -- the account being requested@@ -195,17 +195,13 @@ menuscr' = msSetSelectedScreen selidx menuscr in ([acctsscr, menuscr'], regscr) - -- No balance sheet accounts detected, or an initial account query specified:- | not hasbsaccts || hasacctquery -> ([msSetSelectedScreen 0 menuscr], allacctsscr)-- | otherwise -> ([menuscr], bsacctsscr)+ -- Otherwise, start on the menu screen.+ | otherwise -> ([], menuscr) where- hasbsaccts = any (`elem` accttypes) [Asset, Liability, Equity]- where accttypes = M.elems $ jaccounttypes j- hasacctquery = matchesQuery queryIsAcct $ _rsQuery rspec menuscr = msNew allacctsscr = asNew uopts today j Nothing+ csacctsscr = csNew uopts today j Nothing bsacctsscr = bsNew uopts today j Nothing isacctsscr = isNew uopts today j Nothing @@ -301,6 +297,7 @@ case aScreen ui of MS _ -> msHandle ev AS _ -> asHandle ev+ CS _ -> csHandle ev BS _ -> bsHandle ev IS _ -> isHandle ev RS _ -> rsHandle ev@@ -312,6 +309,7 @@ case aScreen ui of MS _ -> msDraw ui AS _ -> asDraw ui+ CS _ -> csDraw ui BS _ -> bsDraw ui IS _ -> isDraw ui RS _ -> rsDraw ui
Hledger/UI/MenuScreen.hs view
@@ -68,8 +68,8 @@ _ -> quickhelp where quickhelp = borderKeysStr' [- ("?", str "help")--- ,("RIGHT", str "register")+ ("DOWN/UP", str "select")+ ,("RIGHT", str "enter screen") -- ,("t", renderToggle (tree_ ropts) "list" "tree") -- ,("t", str "tree") -- ,("l", str "list")@@ -79,8 +79,9 @@ --,("/", "filter") --,("DEL", "unfilter") --,("ESC", "cancel/top")- ,("a", str "add")+ ,("a", str "add txn") -- ,("g", "reload")+ ,("?", str "help") ,("q", str "quit") ] @@ -258,6 +259,7 @@ let scr = case scrname of Accounts -> asNew uopts d j Nothing+ CashScreen -> csNew uopts d j Nothing Balancesheet -> bsNew uopts d j Nothing Incomestatement -> isNew uopts d j Nothing put' $ pushScreen scr ui
Hledger/UI/RegisterScreen.hs view
@@ -136,9 +136,8 @@ _ -> quickhelp where quickhelp = borderKeysStr' [- ("?", str "help")- ,("LEFT", str "back")--- ,("RIGHT", str "transaction")+ ("LEFT", str "back")+ -- ,("RIGHT", str "transaction") -- tree/list mode - rsForceInclusive may override, but use tree_ to ensure a visible toggle effect ,("t", renderToggle (tree_ ropts) "list(-subs)" "tree(+subs)")@@ -147,9 +146,10 @@ ,("H", renderToggle (not ishistorical) "historical" "period") ,("F", renderToggle1 (isJust . forecast_ . inputopts_ $ copts) "forecast")--- ,("a", "add")--- ,("g", "reload")--- ,("q", "quit")+ -- ,("a", "add")+ -- ,("g", "reload")+ ,("?", str "help")+ -- ,("q", "quit") ] rsDraw _ = dbgui "rsDraw 2" $ errorWrongScreenType "draw function" -- PARTIAL:
Hledger/UI/TransactionScreen.hs view
@@ -30,7 +30,7 @@ import Hledger.UI.UIScreens import Hledger.UI.Editor import Brick.Widgets.Edit (editorText, renderEditor)-import Hledger.UI.ErrorScreen (uiReloadJournalIfChanged, uiCheckBalanceAssertions)+import Hledger.UI.ErrorScreen (uiReloadJournalIfChanged, uiCheckBalanceAssertions, uiReloadJournal) tsDraw :: UIState -> [Widget Name] tsDraw UIState{aopts=UIOpts{uoCliOpts=copts@CliOpts{reportspec_=rspec@ReportSpec{_rsReportOpts=ropts}}}@@ -85,14 +85,14 @@ -- _ -> quickhelp where quickhelp = borderKeysStr [- ("?", "help")- ,("LEFT", "back")- ,("UP/DOWN", "prev/next")+ ("LEFT", "back")+ ,("UP/DOWN", "prev/next txn") --,("ESC", "cancel/top") -- ,("a", "add")- ,("E", "editor")+ ,("E", "edit") ,("g", "reload")- ,("q", "quit")+ ,("?", "help")+ -- ,("q", "quit") ] tsDraw _ = errorWrongScreenType "draw function" -- PARTIAL:@@ -145,12 +145,15 @@ put' $ regenerateScreens j d $ setReportPeriod (DayPeriod d) ui where p = reportPeriod ui- e | e `elem` [VtyEvent (EvKey (KChar 'g') []), AppEvent FileChange] -> do- -- plog (if e == AppEvent FileChange then "file change" else "manual reload") "" `seq` return ()- ej <- liftIO . runExceptT $ journalReload copts- case ej of- Left err -> put' $ pushScreen (esNew err) ui- Right j' -> put' $ regenerateScreens j' d ui++ -- Reload. Warning, this updates parent screens but not the transaction screen itself (see tsUpdate).+ -- To see the updated transaction, one must exit and re-enter the transaction screen.+ e | e `elem` [VtyEvent (EvKey (KChar 'g') []), AppEvent FileChange] ->+ liftIO (uiReloadJournal copts d ui) >>= put'+ -- debugging.. leaving these here because they were hard to find+ -- \u -> dbguiEv (pshow u) >> put' u -- doesn't log+ -- \UIState{aScreen=TS tss} -> error $ pshow $ _tssTransaction tss+ VtyEvent (EvKey (KChar 'I') []) -> put' $ uiCheckBalanceAssertions d (toggleIgnoreBalanceAssertions ui) -- for toggles that may change the current/prev/next transactions,
Hledger/UI/UIOptions.hs view
@@ -36,10 +36,10 @@ -- flagNone ["debug-ui"] (setboolopt "rules-file") "run with no terminal output, showing console" flagNone ["watch","w"] (setboolopt "watch") "watch for data and date changes and reload automatically" ,flagReq ["theme"] (\s opts -> Right $ setopt "theme" s opts) "THEME" ("use this custom display theme ("++intercalate ", " themeNames++")")- ,flagNone ["menu"] (setboolopt "menu") "start in the menu screen"- ,flagNone ["all"] (setboolopt "all") "start in the all accounts screen"+ ,flagNone ["cash"] (setboolopt "cash") "start in the cash accounts screen" ,flagNone ["bs"] (setboolopt "bs") "start in the balance sheet accounts screen" ,flagNone ["is"] (setboolopt "is") "start in the income statement accounts screen"+ ,flagNone ["all"] (setboolopt "all") "start in the all accounts screen" ,flagReq ["register"] (\s opts -> Right $ setopt "register" s opts) "ACCTREGEX" "start in the (first matched) account's register" ,flagNone ["change"] (setboolopt "change") "show period balances (changes) at startup instead of historical balances"@@ -57,7 +57,7 @@ --uimode :: Mode RawOpts uimode = (mode "hledger-ui" (setopt "command" "ui" def) "browse accounts, postings and entries in a full-window TUI"- (argsFlag "[--menu|--all|--bs|--is|--register=ACCT] [QUERY]") []){+ (argsFlag "[--cash|--bs|--is|--all|--register=ACCT] [QUERY]") []){ modeGroupFlags = Group { groupUnnamed = uiflags ,groupHidden = hiddenflags
Hledger/UI/UIScreens.hs view
@@ -22,10 +22,16 @@ ,msUpdate ,asNew ,asUpdate+,asItemIndex+,csNew+,csUpdate+,csItemIndex ,bsNew ,bsUpdate+,bsItemIndex ,isNew ,isUpdate+,isItemIndex ,rsNew ,rsUpdate ,tsNew@@ -52,6 +58,7 @@ screenUpdate opts d j = \case MS sst -> MS $ msUpdate sst -- opts d j ass AS sst -> AS $ asUpdate opts d j sst+ CS sst -> CS $ csUpdate opts d j sst BS sst -> BS $ bsUpdate opts d j sst IS sst -> IS $ isUpdate opts d j sst RS sst -> RS $ rsUpdate opts d j sst@@ -73,22 +80,30 @@ esUpdate :: ErrorScreenState -> ErrorScreenState esUpdate = dbgui "esUpdate`" --- | Construct a menu screen.+-- | Construct a menu screen, with the first item selected. -- Screen-specific arguments: none. msNew :: Screen msNew = dbgui "msNew" $- MS MSS {- _mssList = list MenuList (V.fromList [- -- keep initial screen stack setup in UI.Main synced with these- MenuScreenItem "All accounts" Accounts+ MS MSS { _mssList = list MenuList (V.fromList items ) 1, _mssUnused = () }+ where+ -- keep synced with: indexes below, initial screen stack setup in UI.Main+ items = [+ MenuScreenItem "Cash accounts" CashScreen ,MenuScreenItem "Balance sheet accounts" Balancesheet ,MenuScreenItem "Income statement accounts" Incomestatement- ]) 1- & listMoveTo 1 -- select balance sheet accounts screen at startup (currently this screen is constructed only then)- ,_mssUnused = ()- }+ ,MenuScreenItem "All accounts" Accounts+ ] +-- keep synced with items above.+-- | Positions of menu screen items, so we can move selection to them.+[+ csItemIndex,+ bsItemIndex,+ isItemIndex,+ asItemIndex+ ] = [0..3] :: [Int]+ -- | Update a menu screen. Currently a no-op since menu screen -- has unchanging content. msUpdate :: MenuScreenState -> MenuScreenState@@ -177,6 +192,21 @@ roptsmod ropts = ropts{balanceaccum_=Historical} -- always show historical end balances extraquery = Type [Asset,Liability,Equity] -- restrict to balance sheet accounts +-- | Construct a cash accounts screen listing the appropriate set of accounts,+-- with the appropriate one selected.+-- Screen-specific arguments: the account to select if any.+csNew :: UIOpts -> Day -> Journal -> Maybe AccountName -> Screen+csNew uopts d j macct = dbgui "csNew" $ CS $ csUpdate uopts d j $ nullass macct++-- | Update a balance sheet screen's state from these options, reporting date, and journal.+csUpdate :: UIOpts -> Day -> Journal -> AccountsScreenState -> AccountsScreenState+csUpdate uopts d = dbgui "csUpdate" .+ asUpdateHelper rspec d copts roptsmod extraquery+ where+ UIOpts{uoCliOpts=copts@CliOpts{reportspec_=rspec}} = uopts+ roptsmod ropts = ropts{balanceaccum_=Historical} -- always show historical end balances+ extraquery = Type [Cash] -- restrict to cash accounts+ -- | Construct an income statement screen listing the appropriate set of accounts, -- with the appropriate one selected. -- Screen-specific arguments: the account to select if any.@@ -322,8 +352,10 @@ ,_tssTransaction = nt } --- | Update a transaction screen. Currently a no-op since transaction screen--- depends only on its screen-specific state.+-- | Update a transaction screen. +-- This currently does nothing because the initialisation in rsHandle is not so easy to extract.+-- To see the updated transaction, one must exit and re-enter the transaction screen.+-- See also tsHandle. tsUpdate :: TransactionScreenState -> TransactionScreenState tsUpdate = dbgui "tsUpdate"
Hledger/UI/UITypes.hs view
@@ -101,6 +101,7 @@ -- Unique names for screens the user can navigate to from the menu. data ScreenName = Accounts+ | CashScreen | Balancesheet | Incomestatement deriving (Ord, Show, Eq)@@ -176,6 +177,7 @@ data Screen = MS MenuScreenState | AS AccountsScreenState+ | CS AccountsScreenState | BS AccountsScreenState | IS AccountsScreenState | RS RegisterScreenState@@ -192,6 +194,7 @@ toAccountsLikeScreen :: Screen -> Maybe AccountsLikeScreen toAccountsLikeScreen scr = case scr of AS ass -> Just $ ALS AS ass+ CS ass -> Just $ ALS CS ass BS ass -> Just $ ALS BS ass IS ass -> Just $ ALS IS ass _ -> Nothing
Hledger/UI/UIUtils.hs view
@@ -163,12 +163,12 @@ ,renderKey ("ESC ", "cancel, or reset app state") ,str " "- ,withAttr (attrName "help" <> attrName "heading") $ str "Accounts screen"+ ,withAttr (attrName "help" <> attrName "heading") $ str "Accounts screens" ,renderKey ("1234567890-+ ", "set/adjust depth limit") ,renderKey ("t ", "toggle accounts tree/list mode") ,renderKey ("H ", "toggle historical balance/change") ,str " "- ,withAttr (attrName "help" <> attrName "heading") $ str "Register screen"+ ,withAttr (attrName "help" <> attrName "heading") $ str "Register screens" ,renderKey ("t ", "toggle subaccount txns\n(and accounts tree/list mode)") ,renderKey ("H ", "toggle historical/period total") ,str " "@@ -181,7 +181,7 @@ vBox [ withAttr (attrName "help" <> attrName "heading") $ str "Filtering" ,renderKey ("/ ", "set a filter query")- ,renderKey ("F ", "show future & periodic txns")+ ,renderKey ("F ", "show future & forecast txns") ,renderKey ("R ", "show real/all postings") ,renderKey ("z ", "show nonzero/all amounts") ,renderKey ("U/P/C ", "show unmarked/pending/cleared")@@ -497,6 +497,7 @@ showScreenId = \case MS _ -> "M" -- menu AS _ -> "A" -- all accounts+ CS _ -> "C" -- cash accounts BS _ -> "B" -- bs accounts IS _ -> "I" -- is accounts RS _ -> "R" -- menu@@ -516,6 +517,7 @@ showScreenSelection = \case MS MSS{_mssList} -> "M" ++ (maybe "" show $ listSelected _mssList) -- menu AS ASS{_assList} -> "A" ++ (maybe "" show $ listSelected _assList) -- all accounts+ CS ASS{_assList} -> "C" ++ (maybe "" show $ listSelected _assList) -- cash accounts BS ASS{_assList} -> "B" ++ (maybe "" show $ listSelected _assList) -- bs accounts IS ASS{_assList} -> "I" ++ (maybe "" show $ listSelected _assList) -- is accounts RS RSS{_rssList} -> "R" ++ (maybe "" show $ listSelected _rssList) -- menu
hledger-ui.1 view
@@ -1,5 +1,5 @@ -.TH "HLEDGER-UI" "1" "April 2023" "hledger-ui-1.29.2 " "hledger User Manuals"+.TH "HLEDGER-UI" "1" "June 2023" "hledger-ui-1.30 " "hledger User Manuals" @@ -8,14 +8,14 @@ hledger-ui - robust, friendly plain text accounting (TUI version) .SH SYNOPSIS .PP-\f[V]hledger-ui [OPTIONS] [QUERYARGS]\f[R]+\f[V]hledger-ui [OPTS] [QUERYARGS]\f[R] .PD 0 .P .PD-\f[V]hledger ui -- [OPTIONS] [QUERYARGS]\f[R]+\f[V]hledger ui -- [OPTS] [QUERYARGS]\f[R] .SH DESCRIPTION .PP-This manual is for hledger\[aq]s terminal interface, version 1.29.2.+This manual is for hledger\[aq]s terminal interface, version 1.30. See also the hledger manual for common concepts and file formats. .PP hledger is a robust, user-friendly, cross-platform set of programs for@@ -30,12 +30,13 @@ It is easier than hledger\[aq]s command-line interface, and sometimes quicker and more convenient than the web interface. .PP-Like hledger, it reads data from one or more files in journal,-timeclock, timedot, or CSV format.-The default file is \f[V].hledger.journal\f[R] in your home directory;-this can be overridden with one or more \f[V]-f FILE\f[R] options, or-the \f[V]LEDGER_FILE\f[R] environment variable.-For more about this see hledger(1), hledger_journal(5) etc.+Like hledger, it reads from (and appends to) a journal file specified by+the \f[V]LEDGER_FILE\f[R] environment variable (defaulting to+\f[V]$HOME/.hledger.journal\f[R]); or you can specify files with+\f[V]-f\f[R] options.+It can also read timeclock files, timedot files, or any CSV/SSV/TSV file+with a date field.+(See hledger(1) -> Input for details.) .PP Unlike hledger, hledger-ui hides all future-dated transactions by default.@@ -44,11 +45,10 @@ enable \[dq]forecast mode\[dq]. .SH OPTIONS .PP-Note: if invoking hledger-ui as a hledger subcommand, write \f[V]--\f[R]-before options as shown above.-.PP Any QUERYARGS are interpreted as a hledger search query which filters the data.+.PP+hledger-ui provides the following options: .TP \f[V]-w --watch\f[R] watch for data and date changes and reload automatically@@ -59,8 +59,8 @@ \f[V]--menu\f[R] start in the menu screen .TP-\f[V]--all\f[R]-start in the all accounts screen+\f[V]--cash\f[R]+start in the cash accounts screen .TP \f[V]--bs\f[R] start in the balance sheet accounts screen@@ -68,6 +68,9 @@ \f[V]--is\f[R] start in the income statement accounts screen .TP+\f[V]--all\f[R]+start in the all accounts screen+.TP \f[V]--register=ACCTREGEX\f[R] start in the (first) matched account\[aq]s register screen .TP@@ -80,8 +83,26 @@ \f[V]-t --tree\f[R] show accounts as a tree .PP-hledger input options:+hledger-ui also supports many of hledger\[aq]s general options (and the+hledger manual\[aq]s command line tips also apply here):+.SS General help options .TP+\f[V]-h --help\f[R]+show general or COMMAND help+.TP+\f[V]--man\f[R]+show general or COMMAND user manual with man+.TP+\f[V]--info\f[R]+show general or COMMAND user manual with info+.TP+\f[V]--version\f[R]+show general or ADDONCMD version+.TP+\f[V]--debug[=N]\f[R]+show debug output (levels 1-9, default: 1)+.SS General input options+.TP \f[V]-f FILE --file=FILE\f[R] use a different input file. For stdin, use - (default: \f[V]$LEDGER_FILE\f[R] or@@ -108,8 +129,7 @@ .TP \f[V]-s --strict\f[R] do extra error checking (check that all posted accounts are declared)-.PP-hledger reporting options:+.SS General reporting options .TP \f[V]-b --begin=DATE\f[R] include postings/txns on or after this date (will be adjusted to@@ -176,17 +196,29 @@ \f[V]--value\f[R] convert amounts to cost or market value, more flexibly than -B/-V/-X .TP+\f[V]--infer-equity\f[R]+infer conversion equity postings from costs+.TP+\f[V]--infer-costs\f[R]+infer costs from conversion equity postings+.TP \f[V]--infer-market-prices\f[R]-use transaction prices (recorded with \[at] or \[at]\[at]) as additional-market prices, as if they were P directives+use costs as additional market prices, as if they were P directives .TP+\f[V]--forecast\f[R]+generate transactions from periodic rules,+between the latest recorded txn and 6 months from today,+or during the specified PERIOD (= is required).+Auto posting rules will be applied to these transactions as well.+Also, in hledger-ui make future-dated transactions visible.+.TP \f[V]--auto\f[R]-apply automated posting rules to modify transactions.+generate extra postings by applying auto posting rules to all txns (not+just forecast txns) .TP-\f[V]--forecast\f[R]-generate future transactions from periodic transaction rules, for the-next 6 months or till report end date.-In hledger-ui, also make ordinary future transactions visible.+\f[V]--verbose-tags\f[R]+add visible tags indicating transactions or postings which have been+generated/modified .TP \f[V]--commodity-style\f[R] Override the commodity style in the output for the specified commodity.@@ -213,27 +245,6 @@ last one takes precedence. .PP Some reporting options can also be written as query arguments.-.PP-hledger help options:-.TP-\f[V]-h --help\f[R]-show general or COMMAND help-.TP-\f[V]--man\f[R]-show general or COMMAND user manual with man-.TP-\f[V]--info\f[R]-show general or COMMAND user manual with info-.TP-\f[V]--version\f[R]-show general or ADDONCMD version-.TP-\f[V]--debug[=N]\f[R]-show debug output (levels 1-9, default: 1)-.PP-A \[at]FILE argument will be expanded to the contents of FILE, which-should contain one command line option/argument per line.-(To prevent this, insert a \f[V]--\f[R] argument before.) .SH MOUSE .PP In most modern terminals, you can navigate through the screens with a@@ -361,100 +372,49 @@ Additional screen-specific keys are described below. .SH SCREENS .PP-hledger-ui shows several different screens, described below.-It shows the \[dq]Balance sheet accounts\[dq] screen to start with,-except in the following situations:-.IP \[bu] 2-If no asset/liability/equity accounts can be detected, or if an account-query has been given on the command line, it starts in the \[dq]All-accounts\[dq] screen.-.IP \[bu] 2-If a starting screen is specified with --menu/--all/--bs/--is/--register-on the command line, it starts in that screen.+At startup, hledger-ui shows a menu screen by default.+From here you can navigate to other screens using the cursor keys:+\f[V]UP\f[R]/\f[V]DOWN\f[R] to select, \f[V]RIGHT\f[R] to move to the+selected screen, \f[V]LEFT\f[R] to return to the previous screen.+Or you can use \f[V]ESC\f[R] to return directly to the top menu screen. .PP-From any screen you can press \f[V]LEFT\f[R] or \f[V]ESC\f[R] to-navigate back to the top level \[dq]Menu\[dq] screen.+You can also use a command line flag to specific a different startup+screen (\f[V]--cs\f[R], \f[V]--bs\f[R], \f[V]--is\f[R], \f[V]--all\f[R],+or \f[V]--register=ACCT\f[R]). .SS Menu .PP-The top-most screen.-From here you can navigate to three accounts screens:-.SS All accounts+This is the top-most screen.+From here you can navigate to several screens listing accounts of+various types.+Note some of these may not show anything until you have configured+account types.+.SS Cash accounts .PP-This screen shows all accounts (possibly filtered by a query), and their-end balances on the date shown in the title bar (or their balance-changes in the period shown in the title bar, toggleable with-\f[V]H\f[R]).-It is like the \f[V]hledger balance\f[R] command.+This screen shows \[dq]cash\[dq] (ie, liquid asset) accounts (like+\f[V]hledger balancesheet type:c\f[R]).+It always shows balances (historical ending balances on the date shown+in the title line). .SS Balance sheet accounts .PP-This screen shows asset, liability and equity accounts, if these can be-detected (see account types).-It always shows end balances.-It is like the \f[V]hledger balancesheetequity\f[R] command.+This screen shows asset, liability and equity accounts (like+\f[V]hledger balancesheetequity\f[R]).+It always shows balances. .SS Income statement accounts .PP-This screen shows revenue and expense accounts.-It always shows balance changes.-It is like the \f[V]hledger incomestatement\f[R] command.-.PP-All of these accounts screens work in much the same way:-.PP-They show accounts which have been posted to by transactions, as well as-accounts which have been declared with an account directive (except for-empty parent accounts).-.PP-If you specify a query on the command line or with \f[V]/\f[R] in the-app, they show just the matched accounts, and the balances from matched-transactions.-.PP-hledger-ui shows accounts with zero balances by default (unlike-command-line hledger).-To hide these, press \f[V]z\f[R] to toggle nonzero mode.-.PP-Account names are shown as a flat list by default; press \f[V]t\f[R] to-toggle tree mode.-In list mode, account balances are exclusive of subaccounts, except-where subaccounts are hidden by a depth limit (see below).-In tree mode, all account balances are inclusive of subaccounts.-.PP-To see less detail, press a number key, \f[V]1\f[R] to \f[V]9\f[R], to-set a depth limit.-Or use \f[V]-\f[R] to decrease and \f[V]+\f[R]/\f[V]=\f[R] to increase-the depth limit.-\f[V]0\f[R] shows even less detail, collapsing all accounts to a single-total.-To remove the depth limit, set it higher than the maximum account depth,-or press \f[V]ESCAPE\f[R].-.PP-\f[V]H\f[R] toggles between showing historical balances or period-balances (on the \[dq]All accounts\[dq] screen).-Historical balances (the default) are ending balances at the end of the-report period, taking into account all transactions before that date-(filtered by the filter query if any), including transactions before the-start of the report period.-In other words, historical balances are what you would see on a bank-statement for that account (unless disturbed by a filter query).-Period balances ignore transactions before the report start date, so-they show the change in balance during the report period.-They are more useful eg when viewing a time log.-.PP-\f[V]U\f[R] toggles filtering by unmarked status, including or excluding-unmarked postings in the balances.-Similarly, \f[V]P\f[R] toggles pending postings, and \f[V]C\f[R] toggles-cleared postings.-(By default, balances include all postings; if you activate one or two-status filters, only those postings are included; and if you activate-all three, the filter is removed.)-.PP-\f[V]R\f[R] toggles real mode, in which virtual postings are ignored.+This screen shows revenue and expense accounts (like+\f[V]hledger incomestatement\f[R]).+It always shows changes (balance changes in the period shown in the+title line).+.SS All accounts .PP-Press \f[V]RIGHT\f[R] to view an account\[aq]s register screen, Or,-\f[V]LEFT\f[R] to see the menu screen.+This screen shows all accounts in your journal (unless filtered by a+query; like \f[V]hledger balance\f[R]).+It shows balances by default; you can toggle showing changes with the+\f[V]H\f[R] key. .SS Register .PP-This screen shows the transactions affecting a particular account, like-a check register.-Each line represents one transaction and shows:+This screen shows the transactions affecting a particular account.+Each line represents one transaction, and shows: .IP \[bu] 2 the other account(s) involved, in abbreviated form. (If there are both real and virtual postings, it shows only the accounts@@ -463,15 +423,18 @@ the overall change to the current account\[aq]s balance; positive for an inflow to this account, negative for an outflow. .IP \[bu] 2-the running historical total or period total for the current account,-after the transaction.-This can be toggled with \f[V]H\f[R].-Similar to the accounts screen, the historical total is affected by-transactions (filtered by the filter query) before the report start-date, while the period total is not.-If the historical total is not disturbed by a filter query, it will be-the running historical balance you would see on a bank register for the-current account.+the running total after the transaction.+With the \f[V]H\f[R] key you can toggle between+.RS 2+.IP \[bu] 2+the period total, which is from just the transactions displayed+.IP \[bu] 2+or the historical total, which includes any undisplayed transactions+before the start of the report period (and matching the filter query if+any).+This will be the running historical balance (what you would see on a+bank\[aq]s website, eg) if not disturbed by a query.+.RE .PP Transactions affecting this account\[aq]s subaccounts will be included in the register if the accounts screen is in tree mode, or if it\[aq]s@@ -516,6 +479,18 @@ The #N number preceding them is the transaction\[aq]s position within the complete unfiltered journal, which is a more stable id (at least until the next reload).+.PP+On this screen (and the register screen), the \f[V]E\f[R] key will open+your text editor with the cursor positioned at the current transaction+if possible.+.PP+This screen has a limitation with showing file updates: it will not show+them until you exit and re-enter it.+So eg to see the effect of using the \f[V]E\f[R] key, currently you+must: - press \f[V]E\f[R], edit and save the file, then exit the editor,+returning to hledger-ui - press \f[V]g\f[R] to reload the file (or use+\f[V]-w/--watch\f[R] mode) - press \f[V]LEFT\f[R] then \f[V]RIGHT\f[R]+to exit and re-enter the transaction screen. .SS Error .PP This screen will appear if there is a problem, such as a parse error,@@ -548,23 +523,25 @@ Of course you can still interact with hledger-ui when needed, eg to toggle cleared mode, or to explore the history. .PP-Here are some current limitations to be aware of:+There are currently some limitations with \f[V]--watch\f[R]: .PP-Changes might not be detected with certain editors, possibly including-Jetbrains IDEs, \f[V]gedit\f[R], other Gnome applications; or on certain-unusual filesystems.-(#1617, #911).-To work around, reload manually by pressing \f[V]g\f[R] in the-hledger-ui window.-(Or see #1617 for another workaround, and let us know if it works for-you.)+It may not work correctly for you, depending on platform or system+configuration.+(Eg #836.) .PP-CPU and memory usage can sometimes gradually increase, if-\f[V]hledger-ui --watch\f[R] is left running for days.-(Possibly correlated with certain platforms, many transactions, and/or-large numbers of other files present).-To work around, \f[V]q\f[R]uit and restart it, or (where supported)-suspend (\f[V]CTRL-z\f[R]) and restart it (\f[V]fg\f[R]).+At least on mac, there can be a slow build-up of CPU usage over time,+until the program is restarted (or, suspending and restarting with+\f[V]CTRL-z\f[R] \f[V]fg\f[R] may be enough).+.PP+It will not detect file changes made by certain editors, such as+Jetbrains IDEs or \f[V]gedit\f[R], or on certain less common+filesystems.+(To work around, press \f[V]g\f[R] to reload manually, or try+#1617\[aq]s \f[V]fs.inotify.max_user_watches\f[R] workaround and let us+know.)+.PP+If you are viewing files mounted from another machine, the system clocks+on both machines should be roughly in agreement. .SS Debug output .PP You can add \f[V]--debug[=N]\f[R] to the command line to log debug@@ -577,91 +554,28 @@ \f[B]COLUMNS\f[R] The screen width to use. Default: the full terminal width. .PP-\f[B]LEDGER_FILE\f[R] The journal file path when not specified with-\f[V]-f\f[R].-.PP-On unix computers, the default value is:-\f[V]\[ti]/.hledger.journal\f[R].-.PP-A more typical value is something like-\f[V]\[ti]/finance/YYYY.journal\f[R], where \f[V]\[ti]/finance\f[R] is a-version-controlled finance directory and YYYY is the current year.-Or, \f[V]\[ti]/finance/current.journal\f[R], where current.journal is a-symbolic link to YYYY.journal.-.PP-The usual way to set this permanently is to add a command to one of your-shell\[aq]s startup files (eg \f[V]\[ti]/.profile\f[R]):-.IP-.nf-\f[C]-export LEDGER_FILE=\[ti]/finance/current.journal\[ga]-\f[R]-.fi-.PP-On some Mac computers, there is a more thorough way to set environment-variables, that will also affect applications started from the GUI (eg,-Emacs started from a dock icon): In-\f[V]\[ti]/.MacOSX/environment.plist\f[R], add an entry like:-.IP-.nf-\f[C]-{- \[dq]LEDGER_FILE\[dq] : \[dq]\[ti]/finance/current.journal\[dq]-}-\f[R]-.fi-.PP-For this to take effect you might need to \f[V]killall Dock\f[R], or-reboot.-.PP-On Windows computers, the default value is probably-\f[V]C:\[rs]Users\[rs]YOURNAME\[rs].hledger.journal\f[R].-You can change this by running a command like this in a powershell-window (let us know if you need to be an Administrator, and if this-persists across a reboot):-.IP-.nf-\f[C]-> setx LEDGER_FILE \[dq]C:\[rs]Users\[rs]MyUserName\[rs]finance\[rs]2021.journal\[dq]-\f[R]-.fi+\f[B]LEDGER_FILE\f[R] The main journal file to use when not specified+with \f[V]-f/--file\f[R].+Default: \f[V]$HOME/.hledger.journal\f[R].+.SH BUGS .PP-Or, change it in settings: see-https://www.java.com/en/download/help/path.html.-.SH FILES+We welcome bug reports in the hledger issue tracker (shortcut:+http://bugs.hledger.org), or on the #hledger chat or hledger mail list+(https://hledger.org/support). .PP-Reads data from one or more files in journal, timeclock, timedot, or CSV-format.-The default file is \f[V].hledger.journal\f[R] in your home directory;-this can be overridden with one or more \f[V]-f FILE\f[R] options, or-the \f[V]LEDGER_FILE\f[R] environment variable.-.SH BUGS+Some known issues: .PP \f[V]-f-\f[R] doesn\[aq]t work (hledger-ui can\[aq]t read from stdin). .PP-\f[V]-V\f[R] affects only the accounts screen.-.PP-When you press \f[V]g\f[R], the current and all previous screens are-regenerated, which may cause a noticeable pause with large files.-Also there is no visual indication that this is in progress.+If you press \f[V]g\f[R] with large files, there could be a noticeable+pause. .PP-\f[V]--watch\f[R] is not yet fully robust.-It works well for normal usage, but many file changes in a short time-(eg saving the file thousands of times with an editor macro) can cause-problems at least on OSX.-Symptoms include: unresponsive UI, periodic resetting of the cursor-position, momentary display of parse errors, high CPU usage eventually-subsiding, and possibly a small but persistent build-up of CPU usage-until the program is restarted.+The Transaction screen does not update from file changes until you exit+and re-endter it (see SCREENS > Transaction above). .PP-Also, if you are viewing files mounted from another machine,-\f[V]-w/--watch\f[R] requires that both machine clocks are roughly in-step.-+\f[V]--watch\f[R] is not yet fully robust on all platforms (see Watch+mode above). -.SH "REPORTING BUGS"-Report bugs at http://bugs.hledger.org-(or on the #hledger chat or hledger mail list) .SH AUTHORS Simon Michael <simon@joyful.com> and contributors.
hledger-ui.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hledger-ui-version: 1.29.2+version: 1.30 synopsis: Curses-style terminal interface for the hledger accounting system description: A simple curses-style terminal user interface for the hledger accounting system. It can be a more convenient way to browse your accounts than the CLI.@@ -50,6 +50,7 @@ Hledger.UI Hledger.UI.AccountsScreen Hledger.UI.BalancesheetScreen+ Hledger.UI.CashScreen Hledger.UI.Editor Hledger.UI.ErrorScreen Hledger.UI.IncomestatementScreen@@ -67,7 +68,7 @@ hs-source-dirs: ./ ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind- cpp-options: -DVERSION="1.29.2"+ cpp-options: -DVERSION="1.30" build-depends: ansi-terminal >=0.9 , async@@ -81,8 +82,8 @@ , extra >=1.6.3 , filepath , fsnotify ==0.4.*- , hledger >=1.29.2 && <1.30- , hledger-lib >=1.29.2 && <1.30+ , hledger ==1.30.*+ , hledger-lib ==1.30.* , megaparsec >=7.0.0 && <9.4 , microlens >=0.4 , microlens-platform >=0.2.3.1
hledger-ui.info view
@@ -13,10 +13,10 @@ hledger-ui - robust, friendly plain text accounting (TUI version) - 'hledger-ui [OPTIONS] [QUERYARGS]'-'hledger ui -- [OPTIONS] [QUERYARGS]'+ 'hledger-ui [OPTS] [QUERYARGS]'+'hledger ui -- [OPTS] [QUERYARGS]' - This manual is for hledger's terminal interface, version 1.29.2. See+ This manual is for hledger's terminal interface, version 1.30. See also the hledger manual for common concepts and file formats. hledger is a robust, user-friendly, cross-platform set of programs@@ -31,11 +31,11 @@ interface, and sometimes quicker and more convenient than the web interface. - Like hledger, it reads data from one or more files in journal,-timeclock, timedot, or CSV format. The default file is-'.hledger.journal' in your home directory; this can be overridden with-one or more '-f FILE' options, or the 'LEDGER_FILE' environment-variable. For more about this see hledger(1), hledger_journal(5) etc.+ Like hledger, it reads from (and appends to) a journal file specified+by the 'LEDGER_FILE' environment variable (defaulting to+'$HOME/.hledger.journal'); or you can specify files with '-f' options.+It can also read timeclock files, timedot files, or any CSV/SSV/TSV file+with a date field. (See hledger(1) -> Input for details.) Unlike hledger, hledger-ui hides all future-dated transactions by default. They can be revealed, along with any rule-generated periodic@@ -50,7 +50,6 @@ * SCREENS:: * TIPS:: * ENVIRONMENT::-* FILES:: * BUGS:: @@ -59,12 +58,11 @@ 1 OPTIONS ********* -Note: if invoking hledger-ui as a hledger subcommand, write '--' before-options as shown above.-- Any QUERYARGS are interpreted as a hledger search query which filters+Any QUERYARGS are interpreted as a hledger search query which filters the data. + hledger-ui provides the following options:+ '-w --watch' watch for data and date changes and reload automatically@@ -74,15 +72,18 @@ '--menu' start in the menu screen-'--all'+'--cash' - start in the all accounts screen+ start in the cash accounts screen '--bs' start in the balance sheet accounts screen '--is' start in the income statement accounts screen+'--all'++ start in the all accounts screen '--register=ACCTREGEX' start in the (first) matched account's register screen@@ -97,8 +98,43 @@ show accounts as a tree - hledger input options:+ hledger-ui also supports many of hledger's general options (and the+hledger manual's command line tips also apply here): +* Menu:++* General help options::+* General input options::+* General reporting options::+++File: hledger-ui.info, Node: General help options, Next: General input options, Up: OPTIONS++1.1 General help options+========================++'-h --help'++ show general or COMMAND help+'--man'++ show general or COMMAND user manual with man+'--info'++ show general or COMMAND user manual with info+'--version'++ show general or ADDONCMD version+'--debug[=N]'++ show debug output (levels 1-9, default: 1)+++File: hledger-ui.info, Node: General input options, Next: General reporting options, Prev: General help options, Up: OPTIONS++1.2 General input options+=========================+ '-f FILE --file=FILE' use a different input file. For stdin, use - (default:@@ -127,8 +163,12 @@ do extra error checking (check that all posted accounts are declared) - hledger reporting options:++File: hledger-ui.info, Node: General reporting options, Prev: General input options, Up: OPTIONS +1.3 General reporting options+=============================+ '-b --begin=DATE' include postings/txns on or after this date (will be adjusted to@@ -197,18 +237,30 @@ convert amounts to cost or market value, more flexibly than -B/-V/-X+'--infer-equity'++ infer conversion equity postings from costs+'--infer-costs'++ infer costs from conversion equity postings '--infer-market-prices' - use transaction prices (recorded with @ or @@) as additional market- prices, as if they were P directives+ use costs as additional market prices, as if they were P directives+'--forecast'++ generate transactions from periodic rules, between the latest+ recorded txn and 6 months from today, or during the specified+ PERIOD (= is required). Auto posting rules will be applied to+ these transactions as well. Also, in hledger-ui make future-dated+ transactions visible. '--auto' - apply automated posting rules to modify transactions.-'--forecast'+ generate extra postings by applying auto posting rules to all txns+ (not just forecast txns)+'--verbose-tags' - generate future transactions from periodic transaction rules, for- the next 6 months or till report end date. In hledger-ui, also- make ordinary future transactions visible.+ add visible tags indicating transactions or postings which have+ been generated/modified '--commodity-style' Override the commodity style in the output for the specified@@ -232,28 +284,6 @@ Some reporting options can also be written as query arguments. - hledger help options:--'-h --help'-- show general or COMMAND help-'--man'-- show general or COMMAND user manual with man-'--info'-- show general or COMMAND user manual with info-'--version'-- show general or ADDONCMD version-'--debug[=N]'-- show debug output (levels 1-9, default: 1)-- A @FILE argument will be expanded to the contents of FILE, which-should contain one command line option/argument per line. (To prevent-this, insert a '--' argument before.)- File: hledger-ui.info, Node: MOUSE, Next: KEYS, Prev: OPTIONS, Up: Top @@ -374,125 +404,83 @@ 4 SCREENS ********* -hledger-ui shows several different screens, described below. It shows-the "Balance sheet accounts" screen to start with, except in the-following situations:-- * If no asset/liability/equity accounts can be detected, or if an- account query has been given on the command line, it starts in the- "All accounts" screen.-- * If a starting screen is specified with -menu/-all/-bs/-is/-register- on the command line, it starts in that screen.+At startup, hledger-ui shows a menu screen by default. From here you+can navigate to other screens using the cursor keys: 'UP'/'DOWN' to+select, 'RIGHT' to move to the selected screen, 'LEFT' to return to the+previous screen. Or you can use 'ESC' to return directly to the top+menu screen. - From any screen you can press 'LEFT' or 'ESC' to navigate back to the-top level "Menu" screen.+ You can also use a command line flag to specific a different startup+screen ('--cs', '--bs', '--is', '--all', or '--register=ACCT'). * Menu: * Menu::-* All accounts::+* Cash accounts:: * Balance sheet accounts:: * Income statement accounts::+* All accounts:: * Register:: * Transaction:: * Error:: -File: hledger-ui.info, Node: Menu, Next: All accounts, Up: SCREENS+File: hledger-ui.info, Node: Menu, Next: Cash accounts, Up: SCREENS 4.1 Menu ======== -The top-most screen. From here you can navigate to three accounts-screens:+This is the top-most screen. From here you can navigate to several+screens listing accounts of various types. Note some of these may not+show anything until you have configured account types. -File: hledger-ui.info, Node: All accounts, Next: Balance sheet accounts, Prev: Menu, Up: SCREENS+File: hledger-ui.info, Node: Cash accounts, Next: Balance sheet accounts, Prev: Menu, Up: SCREENS -4.2 All accounts-================+4.2 Cash accounts+================= -This screen shows all accounts (possibly filtered by a query), and their-end balances on the date shown in the title bar (or their balance-changes in the period shown in the title bar, toggleable with 'H'). It-is like the 'hledger balance' command.+This screen shows "cash" (ie, liquid asset) accounts (like 'hledger+balancesheet type:c'). It always shows balances (historical ending+balances on the date shown in the title line). -File: hledger-ui.info, Node: Balance sheet accounts, Next: Income statement accounts, Prev: All accounts, Up: SCREENS+File: hledger-ui.info, Node: Balance sheet accounts, Next: Income statement accounts, Prev: Cash accounts, Up: SCREENS 4.3 Balance sheet accounts ========================== -This screen shows asset, liability and equity accounts, if these can be-detected (see account types). It always shows end balances. It is like-the 'hledger balancesheetequity' command.+This screen shows asset, liability and equity accounts (like 'hledger+balancesheetequity'). It always shows balances. -File: hledger-ui.info, Node: Income statement accounts, Next: Register, Prev: Balance sheet accounts, Up: SCREENS+File: hledger-ui.info, Node: Income statement accounts, Next: All accounts, Prev: Balance sheet accounts, Up: SCREENS 4.4 Income statement accounts ============================= -This screen shows revenue and expense accounts. It always shows balance-changes. It is like the 'hledger incomestatement' command.-- All of these accounts screens work in much the same way:-- They show accounts which have been posted to by transactions, as well-as accounts which have been declared with an account directive (except-for empty parent accounts).-- If you specify a query on the command line or with '/' in the app,-they show just the matched accounts, and the balances from matched-transactions.-- hledger-ui shows accounts with zero balances by default (unlike-command-line hledger). To hide these, press 'z' to toggle nonzero mode.-- Account names are shown as a flat list by default; press 't' to-toggle tree mode. In list mode, account balances are exclusive of-subaccounts, except where subaccounts are hidden by a depth limit (see-below). In tree mode, all account balances are inclusive of-subaccounts.-- To see less detail, press a number key, '1' to '9', to set a depth-limit. Or use '-' to decrease and '+'/'=' to increase the depth limit.-'0' shows even less detail, collapsing all accounts to a single total.-To remove the depth limit, set it higher than the maximum account depth,-or press 'ESCAPE'.-- 'H' toggles between showing historical balances or period balances-(on the "All accounts" screen). Historical balances (the default) are-ending balances at the end of the report period, taking into account all-transactions before that date (filtered by the filter query if any),-including transactions before the start of the report period. In other-words, historical balances are what you would see on a bank statement-for that account (unless disturbed by a filter query). Period balances-ignore transactions before the report start date, so they show the-change in balance during the report period. They are more useful eg-when viewing a time log.+This screen shows revenue and expense accounts (like 'hledger+incomestatement'). It always shows changes (balance changes in the+period shown in the title line). - 'U' toggles filtering by unmarked status, including or excluding-unmarked postings in the balances. Similarly, 'P' toggles pending-postings, and 'C' toggles cleared postings. (By default, balances-include all postings; if you activate one or two status filters, only-those postings are included; and if you activate all three, the filter-is removed.)++File: hledger-ui.info, Node: All accounts, Next: Register, Prev: Income statement accounts, Up: SCREENS - 'R' toggles real mode, in which virtual postings are ignored.+4.5 All accounts+================ - Press 'RIGHT' to view an account's register screen, Or, 'LEFT' to see-the menu screen.+This screen shows all accounts in your journal (unless filtered by a+query; like 'hledger balance'). It shows balances by default; you can+toggle showing changes with the 'H' key. -File: hledger-ui.info, Node: Register, Next: Transaction, Prev: Income statement accounts, Up: SCREENS+File: hledger-ui.info, Node: Register, Next: Transaction, Prev: All accounts, Up: SCREENS -4.5 Register+4.6 Register ============ -This screen shows the transactions affecting a particular account, like-a check register. Each line represents one transaction and shows:+This screen shows the transactions affecting a particular account. Each+line represents one transaction, and shows: * the other account(s) involved, in abbreviated form. (If there are both real and virtual postings, it shows only the accounts affected@@ -501,14 +489,17 @@ * the overall change to the current account's balance; positive for an inflow to this account, negative for an outflow. - * the running historical total or period total for the current- account, after the transaction. This can be toggled with 'H'.- Similar to the accounts screen, the historical total is affected by- transactions (filtered by the filter query) before the report start- date, while the period total is not. If the historical total is- not disturbed by a filter query, it will be the running historical- balance you would see on a bank register for the current account.+ * the running total after the transaction. With the 'H' key you can+ toggle between + * the period total, which is from just the transactions+ displayed+ * or the historical total, which includes any undisplayed+ transactions before the start of the report period (and+ matching the filter query if any). This will be the running+ historical balance (what you would see on a bank's website,+ eg) if not disturbed by a query.+ Transactions affecting this account's subaccounts will be included in the register if the accounts screen is in tree mode, or if it's in list mode but this account has subaccounts which are not shown due to a depth@@ -534,7 +525,7 @@ File: hledger-ui.info, Node: Transaction, Next: Error, Prev: Register, Up: SCREENS -4.6 Transaction+4.7 Transaction =============== This screen shows a single transaction, as a general journal entry,@@ -555,10 +546,21 @@ unfiltered journal, which is a more stable id (at least until the next reload). + On this screen (and the register screen), the 'E' key will open your+text editor with the cursor positioned at the current transaction if+possible.++ This screen has a limitation with showing file updates: it will not+show them until you exit and re-enter it. So eg to see the effect of+using the 'E' key, currently you must: - press 'E', edit and save the+file, then exit the editor, returning to hledger-ui - press 'g' to+reload the file (or use '-w/--watch' mode) - press 'LEFT' then 'RIGHT'+to exit and re-enter the transaction screen.+ File: hledger-ui.info, Node: Error, Prev: Transaction, Up: SCREENS -4.7 Error+4.8 Error ========= This screen will appear if there is a problem, such as a parse error,@@ -600,20 +602,23 @@ hledger-ui when needed, eg to toggle cleared mode, or to explore the history. - Here are some current limitations to be aware of:+ There are currently some limitations with '--watch': - Changes might not be detected with certain editors, possibly-including Jetbrains IDEs, 'gedit', other Gnome applications; or on-certain unusual filesystems. (#1617, #911). To work around, reload-manually by pressing 'g' in the hledger-ui window. (Or see #1617 for-another workaround, and let us know if it works for you.)+ It may not work correctly for you, depending on platform or system+configuration. (Eg #836.) - CPU and memory usage can sometimes gradually increase, if 'hledger-ui---watch' is left running for days. (Possibly correlated with certain-platforms, many transactions, and/or large numbers of other files-present). To work around, 'q'uit and restart it, or (where supported)-suspend ('CTRL-z') and restart it ('fg').+ At least on mac, there can be a slow build-up of CPU usage over time,+until the program is restarted (or, suspending and restarting with+'CTRL-z' 'fg' may be enough). + It will not detect file changes made by certain editors, such as+Jetbrains IDEs or 'gedit', or on certain less common filesystems. (To+work around, press 'g' to reload manually, or try #1617's+'fs.inotify.max_user_watches' workaround and let us know.)++ If you are viewing files mounted from another machine, the system+clocks on both machines should be roughly in agreement.+ File: hledger-ui.info, Node: Debug output, Prev: Watch mode, Up: TIPS @@ -625,121 +630,81 @@ ranges from 1 (least output, the default) to 9 (maximum output). -File: hledger-ui.info, Node: ENVIRONMENT, Next: FILES, Prev: TIPS, Up: Top+File: hledger-ui.info, Node: ENVIRONMENT, Next: BUGS, Prev: TIPS, Up: Top 6 ENVIRONMENT ************* *COLUMNS* The screen width to use. Default: the full terminal width. - *LEDGER_FILE* The journal file path when not specified with '-f'.-- On unix computers, the default value is: '~/.hledger.journal'.-- A more typical value is something like '~/finance/YYYY.journal',-where '~/finance' is a version-controlled finance directory and YYYY is-the current year. Or, '~/finance/current.journal', where-current.journal is a symbolic link to YYYY.journal.-- The usual way to set this permanently is to add a command to one of-your shell's startup files (eg '~/.profile'):--export LEDGER_FILE=~/finance/current.journal`-- On some Mac computers, there is a more thorough way to set-environment variables, that will also affect applications started from-the GUI (eg, Emacs started from a dock icon): In-'~/.MacOSX/environment.plist', add an entry like:--{- "LEDGER_FILE" : "~/finance/current.journal"-}-- For this to take effect you might need to 'killall Dock', or reboot.-- On Windows computers, the default value is probably-'C:\Users\YOURNAME\.hledger.journal'. You can change this by running a-command like this in a powershell window (let us know if you need to be-an Administrator, and if this persists across a reboot):--> setx LEDGER_FILE "C:\Users\MyUserName\finance\2021.journal"-- Or, change it in settings: see-https://www.java.com/en/download/help/path.html.---File: hledger-ui.info, Node: FILES, Next: BUGS, Prev: ENVIRONMENT, Up: Top--7 FILES-*******--Reads data from one or more files in journal, timeclock, timedot, or CSV-format. The default file is '.hledger.journal' in your home directory;-this can be overridden with one or more '-f FILE' options, or the-'LEDGER_FILE' environment variable.+ *LEDGER_FILE* The main journal file to use when not specified with+'-f/--file'. Default: '$HOME/.hledger.journal'. -File: hledger-ui.info, Node: BUGS, Prev: FILES, Up: Top+File: hledger-ui.info, Node: BUGS, Prev: ENVIRONMENT, Up: Top -8 BUGS+7 BUGS ****** -'-f-' doesn't work (hledger-ui can't read from stdin).+We welcome bug reports in the hledger issue tracker (shortcut:+http://bugs.hledger.org), or on the #hledger chat or hledger mail list+(https://hledger.org/support). - '-V' affects only the accounts screen.+ Some known issues: - When you press 'g', the current and all previous screens are-regenerated, which may cause a noticeable pause with large files. Also-there is no visual indication that this is in progress.+ '-f-' doesn't work (hledger-ui can't read from stdin). - '--watch' is not yet fully robust. It works well for normal usage,-but many file changes in a short time (eg saving the file thousands of-times with an editor macro) can cause problems at least on OSX. Symptoms-include: unresponsive UI, periodic resetting of the cursor position,-momentary display of parse errors, high CPU usage eventually subsiding,-and possibly a small but persistent build-up of CPU usage until the-program is restarted.+ If you press 'g' with large files, there could be a noticeable pause. - Also, if you are viewing files mounted from another machine,-'-w/--watch' requires that both machine clocks are roughly in step.+ The Transaction screen does not update from file changes until you+exit and re-endter it (see SCREENS > Transaction above). + '--watch' is not yet fully robust on all platforms (see Watch mode+above).+ Tag Table: Node: Top223-Node: OPTIONS1843-Ref: #options1941-Node: MOUSE7025-Ref: #mouse7120-Node: KEYS7357-Ref: #keys7450-Node: SCREENS11963-Ref: #screens12061-Node: Menu12747-Ref: #menu12839-Node: All accounts12916-Ref: #all-accounts13055-Node: Balance sheet accounts13306-Ref: #balance-sheet-accounts13486-Node: Income statement accounts13674-Ref: #income-statement-accounts13856-Node: Register16276-Ref: #register16413-Node: Transaction18397-Ref: #transaction18520-Node: Error19390-Ref: #error19484-Node: TIPS19728-Ref: #tips19827-Node: Watch mode19869-Ref: #watch-mode19976-Node: Debug output21432-Ref: #debug-output21543-Node: ENVIRONMENT21755-Ref: #environment21866-Node: FILES23251-Ref: #files23350-Node: BUGS23598-Ref: #bugs23675+Node: OPTIONS1830+Ref: #options1928+Node: General help options2951+Ref: #general-help-options3100+Node: General input options3382+Ref: #general-input-options3567+Node: General reporting options4269+Ref: #general-reporting-options4433+Node: MOUSE7823+Ref: #mouse7918+Node: KEYS8155+Ref: #keys8248+Node: SCREENS12761+Ref: #screens12859+Node: Menu13439+Ref: #menu13532+Node: Cash accounts13727+Ref: #cash-accounts13869+Node: Balance sheet accounts14053+Ref: #balance-sheet-accounts14234+Node: Income statement accounts14354+Ref: #income-statement-accounts14540+Node: All accounts14704+Ref: #all-accounts14850+Node: Register15032+Ref: #register15156+Node: Transaction17118+Ref: #transaction17241+Node: Error18658+Ref: #error18752+Node: TIPS18996+Ref: #tips19095+Node: Watch mode19137+Ref: #watch-mode19244+Node: Debug output20703+Ref: #debug-output20814+Node: ENVIRONMENT21026+Ref: #environment21136+Node: BUGS21327+Ref: #bugs21410 End Tag Table
hledger-ui.txt view
@@ -7,16 +7,16 @@ hledger-ui - robust, friendly plain text accounting (TUI version) SYNOPSIS- hledger-ui [OPTIONS] [QUERYARGS]- hledger ui -- [OPTIONS] [QUERYARGS]+ hledger-ui [OPTS] [QUERYARGS]+ hledger ui -- [OPTS] [QUERYARGS] DESCRIPTION- This manual is for hledger's terminal interface, version 1.29.2. See+ This manual is for hledger's terminal interface, version 1.30. See also the hledger manual for common concepts and file formats. hledger is a robust, user-friendly, cross-platform set of programs for- tracking money, time, or any other commodity, using double-entry- accounting and a simple, editable file format. hledger is inspired by+ tracking money, time, or any other commodity, using double-entry ac-+ counting and a simple, editable file format. hledger is inspired by and largely compatible with ledger(1), and largely interconvertible with beancount(1). @@ -26,24 +26,23 @@ line interface, and sometimes quicker and more convenient than the web interface. - Like hledger, it reads data from one or more files in journal, time-- clock, timedot, or CSV format. The default file is .hledger.journal in- your home directory; this can be overridden with one or more -f FILE- options, or the LEDGER_FILE environment variable. For more about this- see hledger(1), hledger_journal(5) etc.+ Like hledger, it reads from (and appends to) a journal file specified+ by the LEDGER_FILE environment variable (defaulting to+ $HOME/.hledger.journal); or you can specify files with -f options. It+ can also read timeclock files, timedot files, or any CSV/SSV/TSV file+ with a date field. (See hledger(1) -> Input for details.) - Unlike hledger, hledger-ui hides all future-dated transactions by- default. They can be revealed, along with any rule-generated periodic+ Unlike hledger, hledger-ui hides all future-dated transactions by de-+ fault. They can be revealed, along with any rule-generated periodic transactions, by pressing the F key (or starting with --forecast) to enable "forecast mode". OPTIONS- Note: if invoking hledger-ui as a hledger subcommand, write -- before- options as shown above.-- Any QUERYARGS are interpreted as a hledger search query which filters+ Any QUERYARGS are interpreted as a hledger search query which filters the data. + hledger-ui provides the following options:+ -w --watch watch for data and date changes and reload automatically @@ -52,17 +51,19 @@ --menu start in the menu screen - --all start in the all accounts screen+ --cash start in the cash accounts screen --bs start in the balance sheet accounts screen --is start in the income statement accounts screen + --all start in the all accounts screen+ --register=ACCTREGEX start in the (first) matched account's register screen --change- show period balances (changes) at startup instead of historical+ show period balances (changes) at startup instead of historical balances -l --flat@@ -71,8 +72,24 @@ -t --tree show accounts as a tree - hledger input options:+ hledger-ui also supports many of hledger's general options (and the+ hledger manual's command line tips also apply here): + General help options+ -h --help+ show general or COMMAND help++ --man show general or COMMAND user manual with man++ --info show general or COMMAND user manual with info++ --version+ show general or ADDONCMD version++ --debug[=N]+ show debug output (levels 1-9, default: 1)++ General input options -f FILE --file=FILE use a different input file. For stdin, use - (default: $LEDGER_FILE or $HOME/.hledger.journal)@@ -97,11 +114,10 @@ assignments) -s --strict- do extra error checking (check that all posted accounts are- declared)-- hledger reporting options:+ do extra error checking (check that all posted accounts are de-+ clared) + General reporting options -b --begin=DATE include postings/txns on or after this date (will be adjusted to preceding subperiod start when using a report interval)@@ -130,8 +146,8 @@ using period expressions syntax --date2- match the secondary date instead (see command help for other- effects)+ match the secondary date instead (see command help for other ef-+ fects) --today=DATE override today's date (affects relative smart dates, for@@ -160,42 +176,55 @@ convert amounts to their cost/selling amount at transaction time -V --market- convert amounts to their market value in default valuation com-+ convert amounts to their market value in default valuation com- modities -X --exchange=COMM convert amounts to their market value in commodity COMM --value- convert amounts to cost or market value, more flexibly than+ convert amounts to cost or market value, more flexibly than -B/-V/-X - --infer-market-prices- use transaction prices (recorded with @ or @@) as additional- market prices, as if they were P directives+ --infer-equity+ infer conversion equity postings from costs - --auto apply automated posting rules to modify transactions.+ --infer-costs+ infer costs from conversion equity postings + --infer-market-prices+ use costs as additional market prices, as if they were P direc-+ tives+ --forecast- generate future transactions from periodic transaction rules,- for the next 6 months or till report end date. In hledger-ui,- also make ordinary future transactions visible.+ generate transactions from periodic rules, between the latest+ recorded txn and 6 months from today, or during the specified+ PERIOD (= is required). Auto posting rules will be applied to+ these transactions as well. Also, in hledger-ui make future-+ dated transactions visible. + --auto generate extra postings by applying auto posting rules to all+ txns (not just forecast txns)++ --verbose-tags+ add visible tags indicating transactions or postings which have+ been generated/modified+ --commodity-style- Override the commodity style in the output for the specified+ Override the commodity style in the output for the specified commodity. For example 'EUR1.000,00'. --color=WHEN (or --colour=WHEN)- Should color-supporting commands use ANSI color codes in text- output. 'auto' (default): whenever stdout seems to be a color-- supporting terminal. 'always' or 'yes': always, useful eg when- piping output into 'less -R'. 'never' or 'no': never. A+ Should color-supporting commands use ANSI color codes in text+ output. 'auto' (default): whenever stdout seems to be a color-+ supporting terminal. 'always' or 'yes': always, useful eg when+ piping output into 'less -R'. 'never' or 'no': never. A NO_COLOR environment variable overrides this. --pretty[=WHEN]- Show prettier output, e.g. using unicode box-drawing charac-- ters. Accepts 'yes' (the default) or 'no' ('y', 'n', 'always',- 'never' also work). If you provide an argument you must use+ Show prettier output, e.g. using unicode box-drawing charac-+ ters. Accepts 'yes' (the default) or 'no' ('y', 'n', 'always',+ 'never' also work). If you provide an argument you must use '=', e.g. '--pretty=yes'. When a reporting option appears more than once in the command line, the@@ -203,27 +232,8 @@ Some reporting options can also be written as query arguments. - hledger help options:-- -h --help- show general or COMMAND help-- --man show general or COMMAND user manual with man-- --info show general or COMMAND user manual with info-- --version- show general or ADDONCMD version-- --debug[=N]- show debug output (levels 1-9, default: 1)-- A @FILE argument will be expanded to the contents of FILE, which should- contain one command line option/argument per line. (To prevent this,- insert a -- argument before.)- MOUSE- In most modern terminals, you can navigate through the screens with a+ In most modern terminals, you can navigate through the screens with a mouse or touchpad: o Use mouse wheel or trackpad to scroll up and down@@ -235,91 +245,91 @@ KEYS Keyboard gives more control. - ? shows a help dialog listing all keys. (Some of these also appear in- the quick help at the bottom of each screen.) Press ? again (or- ESCAPE, or LEFT, or q) to close it. The following keys work on most+ ? shows a help dialog listing all keys. (Some of these also appear in+ the quick help at the bottom of each screen.) Press ? again (or ES-+ CAPE, or LEFT, or q) to close it. The following keys work on most screens: - The cursor keys navigate: RIGHT or ENTER goes deeper, LEFT returns to+ The cursor keys navigate: RIGHT or ENTER goes deeper, LEFT returns to the previous screen, UP/DOWN/PGUP/PGDN/HOME/END move up and down- through lists. Emacs-style (CTRL-p/CTRL-n/CTRL-f/CTRL-b) and VI-style- (k,j,l,h) movement keys are also supported. A tip: movement speed is- limited by your keyboard repeat rate, to move faster you may want to- adjust it. (If you're on a mac, the karabiner app is one way to do+ through lists. Emacs-style (CTRL-p/CTRL-n/CTRL-f/CTRL-b) and VI-style+ (k,j,l,h) movement keys are also supported. A tip: movement speed is+ limited by your keyboard repeat rate, to move faster you may want to+ adjust it. (If you're on a mac, the karabiner app is one way to do that.) - With shift pressed, the cursor keys adjust the report period, limiting- the transactions to be shown (by default, all are shown). SHIFT-- DOWN/UP steps downward and upward through these standard report period- durations: year, quarter, month, week, day. Then, SHIFT-LEFT/RIGHT- moves to the previous/next period. T sets the report period to today.- With the -w/--watch option, when viewing a "current" period (the cur-+ With shift pressed, the cursor keys adjust the report period, limiting+ the transactions to be shown (by default, all are shown). SHIFT-+ DOWN/UP steps downward and upward through these standard report period+ durations: year, quarter, month, week, day. Then, SHIFT-LEFT/RIGHT+ moves to the previous/next period. T sets the report period to today.+ With the -w/--watch option, when viewing a "current" period (the cur- rent day, week, month, quarter, or year), the period will move automat-- ically to track the current date. To set a non-standard period, you+ ically to track the current date. To set a non-standard period, you can use / and a date: query. - (Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as- of MacOS Monterey. You can configure them as follows: open Terminal,- press CMD-comma to open preferences, click Profiles, select your cur-+ (Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as+ of MacOS Monterey. You can configure them as follows: open Terminal,+ press CMD-comma to open preferences, click Profiles, select your cur- rent terminal profile on the left, click Keyboard on the right, click + and add this for Shift-Down: \033[1;2B, click + and add this for Shift-- Up: \033[1;2A. Press the Escape key to enter the \033 part, you can't+ Up: \033[1;2A. Press the Escape key to enter the \033 part, you can't type it directly.) - / lets you set a general filter query limiting the data shown, using- the same query terms as in hledger and hledger-web. While editing the- query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set+ / lets you set a general filter query limiting the data shown, using+ the same query terms as in hledger and hledger-web. While editing the+ query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set it, or ESCAPEto cancel. There are also keys for quickly adjusting some- common filters like account depth and transaction status (see below).+ common filters like account depth and transaction status (see below). BACKSPACE or DELETE removes all filters, showing all transactions. - As mentioned above, by default hledger-ui hides future transactions -+ As mentioned above, by default hledger-ui hides future transactions - both ordinary transactions recorded in the journal, and periodic trans-- actions generated by rule. F toggles forecast mode, in which- future/forecasted transactions are shown.+ actions generated by rule. F toggles forecast mode, in which fu-+ ture/forecasted transactions are shown. - ESCAPE resets the UI state and jumps back to the top screen, restoring- the app's initial state at startup. Or, it cancels minibuffer data- entry or the help dialog.+ ESCAPE resets the UI state and jumps back to the top screen, restoring+ the app's initial state at startup. Or, it cancels minibuffer data en-+ try or the help dialog. CTRL-l redraws the screen and centers the selection if possible (selec-- tions near the top won't be centered, since we don't scroll above the+ tions near the top won't be centered, since we don't scroll above the top). - g reloads from the data file(s) and updates the current screen and any- previous screens. (With large files, this could cause a noticeable+ g reloads from the data file(s) and updates the current screen and any+ previous screens. (With large files, this could cause a noticeable pause.) - I toggles balance assertion checking. Disabling balance assertions+ I toggles balance assertion checking. Disabling balance assertions temporarily can be useful for troubleshooting. - a runs command-line hledger's add command, and reloads the updated+ a runs command-line hledger's add command, and reloads the updated file. This allows some basic data entry. - A is like a, but runs the hledger-iadd tool, which provides a terminal- interface. This key will be available if hledger-iadd is installed in+ A is like a, but runs the hledger-iadd tool, which provides a terminal+ interface. This key will be available if hledger-iadd is installed in $path. - E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacsclient -a ""- -nw) on the journal file. With some editors (emacs, vi), the cursor- will be positioned at the current transaction when invoked from the- register and transaction screens, and at the error location (if possi-+ E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacsclient -a ""+ -nw) on the journal file. With some editors (emacs, vi), the cursor+ will be positioned at the current transaction when invoked from the+ register and transaction screens, and at the error location (if possi- ble) when invoked from the error screen. - B toggles cost mode, showing amounts in their cost's commodity (like+ B toggles cost mode, showing amounts in their cost's commodity (like toggling the -B/--cost flag). - V toggles value mode, showing amounts' current market value in their- default valuation commodity (like toggling the -V/--market flag).- Note, "current market value" means the value on the report end date if- specified, otherwise today. To see the value on another date, you can- temporarily set that as the report end date. Eg: to see a transaction- as it was valued on july 30, go to the accounts or register screen,+ V toggles value mode, showing amounts' current market value in their+ default valuation commodity (like toggling the -V/--market flag).+ Note, "current market value" means the value on the report end date if+ specified, otherwise today. To see the value on another date, you can+ temporarily set that as the report end date. Eg: to see a transaction+ as it was valued on july 30, go to the accounts or register screen, press /, and add date:-7/30 to the query. At most one of cost or value mode can be active at once. - There's not yet any visual reminder when cost or value mode is active;+ There's not yet any visual reminder when cost or value mode is active; for now pressing b b v should reliably reset to normal mode. q quits the application.@@ -327,89 +337,41 @@ Additional screen-specific keys are described below. SCREENS- hledger-ui shows several different screens, described below. It shows- the "Balance sheet accounts" screen to start with, except in the fol-- lowing situations:-- o If no asset/liability/equity accounts can be detected, or if an- account query has been given on the command line, it starts in the- "All accounts" screen.-- o If a starting screen is specified with --menu/--all/--bs/--is/--reg-- ister on the command line, it starts in that screen.+ At startup, hledger-ui shows a menu screen by default. From here you+ can navigate to other screens using the cursor keys: UP/DOWN to select,+ RIGHT to move to the selected screen, LEFT to return to the previous+ screen. Or you can use ESC to return directly to the top menu screen. - From any screen you can press LEFT or ESC to navigate back to the top- level "Menu" screen.+ You can also use a command line flag to specific a different startup+ screen (--cs, --bs, --is, --all, or --register=ACCT). Menu- The top-most screen. From here you can navigate to three accounts- screens:+ This is the top-most screen. From here you can navigate to several+ screens listing accounts of various types. Note some of these may not+ show anything until you have configured account types. - All accounts- This screen shows all accounts (possibly filtered by a query), and- their end balances on the date shown in the title bar (or their balance- changes in the period shown in the title bar, toggleable with H). It- is like the hledger balance command.+ Cash accounts+ This screen shows "cash" (ie, liquid asset) accounts (like hledger bal-+ ancesheet type:c). It always shows balances (historical ending bal-+ ances on the date shown in the title line). Balance sheet accounts- This screen shows asset, liability and equity accounts, if these can be- detected (see account types). It always shows end balances. It is- like the hledger balancesheetequity command.+ This screen shows asset, liability and equity accounts (like hledger+ balancesheetequity). It always shows balances. Income statement accounts- This screen shows revenue and expense accounts. It always shows bal-- ance changes. It is like the hledger incomestatement command.-- All of these accounts screens work in much the same way:-- They show accounts which have been posted to by transactions, as well- as accounts which have been declared with an account directive (except- for empty parent accounts).-- If you specify a query on the command line or with / in the app, they- show just the matched accounts, and the balances from matched transac-- tions.-- hledger-ui shows accounts with zero balances by default (unlike com-- mand-line hledger). To hide these, press z to toggle nonzero mode.-- Account names are shown as a flat list by default; press t to toggle- tree mode. In list mode, account balances are exclusive of subac-- counts, except where subaccounts are hidden by a depth limit (see- below). In tree mode, all account balances are inclusive of subac-- counts.-- To see less detail, press a number key, 1 to 9, to set a depth limit.- Or use - to decrease and +/= to increase the depth limit. 0 shows even- less detail, collapsing all accounts to a single total. To remove the- depth limit, set it higher than the maximum account depth, or press- ESCAPE.-- H toggles between showing historical balances or period balances (on- the "All accounts" screen). Historical balances (the default) are end-- ing balances at the end of the report period, taking into account all- transactions before that date (filtered by the filter query if any),- including transactions before the start of the report period. In other- words, historical balances are what you would see on a bank statement- for that account (unless disturbed by a filter query). Period balances- ignore transactions before the report start date, so they show the- change in balance during the report period. They are more useful eg- when viewing a time log.-- U toggles filtering by unmarked status, including or excluding unmarked- postings in the balances. Similarly, P toggles pending postings, and C- toggles cleared postings. (By default, balances include all postings;- if you activate one or two status filters, only those postings are- included; and if you activate all three, the filter is removed.)-- R toggles real mode, in which virtual postings are ignored.+ This screen shows revenue and expense accounts (like hledger incomes-+ tatement). It always shows changes (balance changes in the period+ shown in the title line). - Press RIGHT to view an account's register screen, Or, LEFT to see the- menu screen.+ All accounts+ This screen shows all accounts in your journal (unless filtered by a+ query; like hledger balance). It shows balances by default; you can+ toggle showing changes with the H key. Register- This screen shows the transactions affecting a particular account, like- a check register. Each line represents one transaction and shows:+ This screen shows the transactions affecting a particular account.+ Each line represents one transaction, and shows: o the other account(s) involved, in abbreviated form. (If there are both real and virtual postings, it shows only the accounts affected@@ -418,25 +380,28 @@ o the overall change to the current account's balance; positive for an inflow to this account, negative for an outflow. - o the running historical total or period total for the current account,- after the transaction. This can be toggled with H. Similar to the- accounts screen, the historical total is affected by transactions- (filtered by the filter query) before the report start date, while- the period total is not. If the historical total is not disturbed by- a filter query, it will be the running historical balance you would- see on a bank register for the current account.+ o the running total after the transaction. With the H key you can tog-+ gle between - Transactions affecting this account's subaccounts will be included in+ o the period total, which is from just the transactions displayed++ o or the historical total, which includes any undisplayed transac-+ tions before the start of the report period (and matching the fil-+ ter query if any). This will be the running historical balance+ (what you would see on a bank's website, eg) if not disturbed by a+ query.++ Transactions affecting this account's subaccounts will be included in the register if the accounts screen is in tree mode, or if it's in list- mode but this account has subaccounts which are not shown due to a- depth limit. In other words, the register always shows the transac-- tions contributing to the balance shown on the accounts screen. Tree+ mode but this account has subaccounts which are not shown due to a+ depth limit. In other words, the register always shows the transac-+ tions contributing to the balance shown on the accounts screen. Tree mode/list mode can be toggled with t here also. - U toggles filtering by unmarked status, showing or hiding unmarked+ U toggles filtering by unmarked status, showing or hiding unmarked transactions. Similarly, P toggles pending transactions, and C toggles- cleared transactions. (By default, transactions with all statuses are- shown; if you activate one or two status filters, only those transac-+ cleared transactions. (By default, transactions with all statuses are+ shown; if you activate one or two status filters, only those transac- tions are shown; and if you activate all three, the filter is removed.) R toggles real mode, in which virtual postings are ignored.@@ -452,58 +417,72 @@ similar to hledger's print command and journal format (hledger_jour- nal(5)). - The transaction's date(s) and any cleared flag, transaction code,- description, comments, along with all of its account postings are- shown. Simple transactions have two postings, but there can be more- (or in certain cases, fewer).+ The transaction's date(s) and any cleared flag, transaction code, de-+ scription, comments, along with all of its account postings are shown.+ Simple transactions have two postings, but there can be more (or in+ certain cases, fewer). UP and DOWN will step through all transactions listed in the previous account register screen. In the title bar, the numbers in parentheses- show your position within that account register. They will vary- depending on which account register you came from (remember most trans-- actions appear in multiple account registers). The #N number preceding+ show your position within that account register. They will vary de-+ pending on which account register you came from (remember most transac-+ tions appear in multiple account registers). The #N number preceding them is the transaction's position within the complete unfiltered jour- nal, which is a more stable id (at least until the next reload). + On this screen (and the register screen), the E key will open your text+ editor with the cursor positioned at the current transaction if possi-+ ble.++ This screen has a limitation with showing file updates: it will not+ show them until you exit and re-enter it. So eg to see the effect of+ using the E key, currently you must: - press E, edit and save the file,+ then exit the editor, returning to hledger-ui - press g to reload the+ file (or use -w/--watch mode) - press LEFT then RIGHT to exit and re-+ enter the transaction screen.+ Error- This screen will appear if there is a problem, such as a parse error,- when you press g to reload. Once you have fixed the problem, press g+ This screen will appear if there is a problem, such as a parse error,+ when you press g to reload. Once you have fixed the problem, press g again to reload and resume normal operation. (Or, you can press escape to cancel the reload attempt.) TIPS Watch mode- One of hledger-ui's best features is the auto-reloading -w/--watch- mode. With this flag, it will update the display automatically when-+ One of hledger-ui's best features is the auto-reloading -w/--watch+ mode. With this flag, it will update the display automatically when- ever changes are saved to the data files. - This is very useful when reconciling. A good workflow is to have your- bank's online register open in a browser window, for reference; the- journal file open in an editor window; and hledger-ui in watch mode in+ This is very useful when reconciling. A good workflow is to have your+ bank's online register open in a browser window, for reference; the+ journal file open in an editor window; and hledger-ui in watch mode in a terminal window, eg: $ hledger-ui --watch --register checking -C - As you mark things cleared in the editor, you can see the effect imme-- diately without having to context switch. This leaves more mental- bandwidth for your accounting. Of course you can still interact with- hledger-ui when needed, eg to toggle cleared mode, or to explore the+ As you mark things cleared in the editor, you can see the effect imme-+ diately without having to context switch. This leaves more mental+ bandwidth for your accounting. Of course you can still interact with+ hledger-ui when needed, eg to toggle cleared mode, or to explore the history. - Here are some current limitations to be aware of:+ There are currently some limitations with --watch: - Changes might not be detected with certain editors, possibly including- Jetbrains IDEs, gedit, other Gnome applications; or on certain unusual- filesystems. (#1617, #911). To work around, reload manually by press-- ing g in the hledger-ui window. (Or see #1617 for another workaround,- and let us know if it works for you.)+ It may not work correctly for you, depending on platform or system con-+ figuration. (Eg #836.) - CPU and memory usage can sometimes gradually increase, if hledger-ui- --watch is left running for days. (Possibly correlated with certain- platforms, many transactions, and/or large numbers of other files- present). To work around, quit and restart it, or (where supported)- suspend (CTRL-z) and restart it (fg).+ At least on mac, there can be a slow build-up of CPU usage over time,+ until the program is restarted (or, suspending and restarting with+ CTRL-z fg may be enough). + It will not detect file changes made by certain editors, such as Jet-+ brains IDEs or gedit, or on certain less common filesystems. (To work+ around, press g to reload manually, or try #1617's fs.ino-+ tify.max_user_watches workaround and let us know.)++ If you are viewing files mounted from another machine, the system+ clocks on both machines should be roughly in agreement.+ Debug output You can add --debug[=N] to the command line to log debug output. This will be logged to the file hledger-ui.log in the current directory. N@@ -512,74 +491,28 @@ ENVIRONMENT COLUMNS The screen width to use. Default: the full terminal width. - LEDGER_FILE The journal file path when not specified with -f.-- On unix computers, the default value is: ~/.hledger.journal.-- A more typical value is something like ~/finance/YYYY.journal, where- ~/finance is a version-controlled finance directory and YYYY is the- current year. Or, ~/finance/current.journal, where current.journal is- a symbolic link to YYYY.journal.-- The usual way to set this permanently is to add a command to one of- your shell's startup files (eg ~/.profile):-- export LEDGER_FILE=~/finance/current.journal`-- On some Mac computers, there is a more thorough way to set environment- variables, that will also affect applications started from the GUI (eg,- Emacs started from a dock icon): In ~/.MacOSX/environment.plist, add an- entry like:-- {- "LEDGER_FILE" : "~/finance/current.journal"- }-- For this to take effect you might need to killall Dock, or reboot.-- On Windows computers, the default value is probably C:\Users\YOUR-- NAME\.hledger.journal. You can change this by running a command like- this in a powershell window (let us know if you need to be an Adminis-- trator, and if this persists across a reboot):-- > setx LEDGER_FILE "C:\Users\MyUserName\finance\2021.journal"+ LEDGER_FILE The main journal file to use when not specified with+ -f/--file. Default: $HOME/.hledger.journal. - Or, change it in settings: see https://www.java.com/en/down-- load/help/path.html.+BUGS+ We welcome bug reports in the hledger issue tracker (shortcut:+ http://bugs.hledger.org), or on the #hledger chat or hledger mail list+ (https://hledger.org/support). -FILES- Reads data from one or more files in journal, timeclock, timedot, or- CSV format. The default file is .hledger.journal in your home direc-- tory; this can be overridden with one or more -f FILE options, or the- LEDGER_FILE environment variable.+ Some known issues: -BUGS -f- doesn't work (hledger-ui can't read from stdin). - -V affects only the accounts screen.-- When you press g, the current and all previous screens are regenerated,- which may cause a noticeable pause with large files. Also there is no- visual indication that this is in progress.+ If you press g with large files, there could be a noticeable pause. - --watch is not yet fully robust. It works well for normal usage, but- many file changes in a short time (eg saving the file thousands of- times with an editor macro) can cause problems at least on OSX. Symp-- toms include: unresponsive UI, periodic resetting of the cursor posi-- tion, momentary display of parse errors, high CPU usage eventually sub-- siding, and possibly a small but persistent build-up of CPU usage until- the program is restarted.+ The Transaction screen does not update from file changes until you exit+ and re-endter it (see SCREENS > Transaction above). - Also, if you are viewing files mounted from another machine, -w/--watch- requires that both machine clocks are roughly in step.+ --watch is not yet fully robust on all platforms (see Watch mode+ above). -REPORTING BUGS- Report bugs at http://bugs.hledger.org (or on the #hledger chat or- hledger mail list)-- AUTHORS Simon Michael <simon@joyful.com> and contributors. See http://hledger.org/CREDITS.html@@ -598,4 +531,4 @@ -hledger-ui-1.29.2 April 2023 HLEDGER-UI(1)+hledger-ui-1.30 June 2023 HLEDGER-UI(1)