diff --git a/hledger-ui/Hledger/UI/UIOptions.hs b/hledger-ui/Hledger/UI/UIOptions.hs index e3d480105..43e8b4742 100644 --- a/hledger-ui/Hledger/UI/UIOptions.hs +++ b/hledger-ui/Hledger/UI/UIOptions.hs @@ -37,10 +37,10 @@ uiflags = [ 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" @@ -58,7 +58,7 @@ uiflags = [ --uimode :: Mode RawOpts uimode = (mode "hledger-ui" (setopt "command" "ui" def) "browse accounts, postings and entries in a full-window TUI" - (argsFlag "[--menu|--all|--cash|--bs|--is|--register=ACCT] [QUERY]") []){ + (argsFlag "[--menu|--cash|--bs|--is|--all|--register=ACCT] [QUERY]") []){ modeGroupFlags = Group { groupUnnamed = uiflags ,groupHidden = hiddenflags diff --git a/hledger-ui/Hledger/UI/UIScreens.hs b/hledger-ui/Hledger/UI/UIScreens.hs index c607223a0..cf8c33283 100644 --- a/hledger-ui/Hledger/UI/UIScreens.hs +++ b/hledger-ui/Hledger/UI/UIScreens.hs @@ -84,14 +84,16 @@ msNew = MS MSS { _mssList = list MenuList (V.fromList [ -- keep initial screen stack setup in UI.Main synced with these - MenuScreenItem "All accounts" Accounts - ,MenuScreenItem "Cash accounts" CashScreen + MenuScreenItem "Cash accounts" CashScreen ,MenuScreenItem "Balance sheet accounts" Balancesheet ,MenuScreenItem "Income statement accounts" Incomestatement + ,MenuScreenItem "All accounts" Accounts ]) 1 & listMoveTo defaultscreenitem ,_mssUnused = () - } where defaultscreenitem = 2 -- select this one at startup (currently this screen is constructed only then) + } where + -- select balance sheet accounts at startup (currently this screen is constructed only then) + defaultscreenitem = 1 -- | Update a menu screen. Currently a no-op since menu screen -- has unchanging content.