ui: add vi-style movement keys, use ? for help (#357)
This commit is contained in:
parent
529d55dd54
commit
dbeb4e3020
@ -186,7 +186,7 @@ asDraw UIState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}}
|
|||||||
Minibuffer ed -> minibuffer ed
|
Minibuffer ed -> minibuffer ed
|
||||||
_ -> quickhelp
|
_ -> quickhelp
|
||||||
quickhelp = borderKeysStr [
|
quickhelp = borderKeysStr [
|
||||||
("h", "help")
|
("?", "help")
|
||||||
,("right", "register")
|
,("right", "register")
|
||||||
,("F", "flat?")
|
,("F", "flat?")
|
||||||
,("-+0123456789", "depth")
|
,("-+0123456789", "depth")
|
||||||
@ -265,7 +265,7 @@ asHandle ui0@UIState{
|
|||||||
EvKey (KChar 'q') [] -> halt ui
|
EvKey (KChar 'q') [] -> halt ui
|
||||||
-- EvKey (KChar 'l') [MCtrl] -> do
|
-- EvKey (KChar 'l') [MCtrl] -> do
|
||||||
EvKey KEsc [] -> continue $ resetScreens d ui
|
EvKey KEsc [] -> continue $ resetScreens d ui
|
||||||
EvKey (KChar c) [] | c `elem` ['h','?'] -> continue $ setMode Help ui
|
EvKey (KChar c) [] | c `elem` ['?'] -> continue $ setMode Help ui
|
||||||
EvKey (KChar 'g') [] -> liftIO (uiReloadJournalIfChanged copts d j ui) >>= continue
|
EvKey (KChar 'g') [] -> liftIO (uiReloadJournalIfChanged copts d j ui) >>= continue
|
||||||
EvKey (KChar 'a') [] -> suspendAndResume $ clearScreen >> setCursorPosition 0 0 >> add copts j >> uiReloadJournalIfChanged copts d j ui
|
EvKey (KChar 'a') [] -> suspendAndResume $ clearScreen >> setCursorPosition 0 0 >> add copts j >> uiReloadJournalIfChanged copts d j ui
|
||||||
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor endPos (journalFilePath j)) >> uiReloadJournalIfChanged copts d j ui
|
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor endPos (journalFilePath j)) >> uiReloadJournalIfChanged copts d j ui
|
||||||
@ -289,18 +289,22 @@ asHandle ui0@UIState{
|
|||||||
EvKey (KChar 'R') [] -> scrollTop >> (continue $ regenerateScreens j d $ toggleReal ui)
|
EvKey (KChar 'R') [] -> scrollTop >> (continue $ regenerateScreens j d $ toggleReal ui)
|
||||||
EvKey (KChar '/') [] -> continue $ regenerateScreens j d $ showMinibuffer ui
|
EvKey (KChar '/') [] -> continue $ regenerateScreens j d $ showMinibuffer ui
|
||||||
EvKey k [] | k `elem` [KBS, KDel] -> (continue $ regenerateScreens j d $ resetFilter ui)
|
EvKey k [] | k `elem` [KBS, KDel] -> (continue $ regenerateScreens j d $ resetFilter ui)
|
||||||
EvKey (KLeft) [] -> continue $ popScreen ui
|
EvKey k [] | k `elem` [KLeft, KChar 'h'] -> continue $ popScreen ui
|
||||||
EvKey k [] | k `elem` [KRight, KEnter] -> scrollTopRegister >> continue (screenEnter d scr ui)
|
EvKey k [] | k `elem` [KRight, KChar 'l', KEnter] -> scrollTopRegister >> continue (screenEnter d scr ui)
|
||||||
where
|
where
|
||||||
scr = rsSetAccount selacct registerScreen
|
scr = rsSetAccount selacct registerScreen
|
||||||
|
|
||||||
-- fall through to the list's event handler (handles up/down)
|
-- fall through to the list's event handler (handles up/down)
|
||||||
ev -> do
|
ev -> do
|
||||||
newitems <- handleEvent ev (scr ^. asList)
|
let ev' = case ev of
|
||||||
continue $ ui{aScreen=scr & asList .~ newitems
|
EvKey (KChar 'k') [] -> EvKey (KUp) []
|
||||||
& asSelectedAccount .~ selacct
|
EvKey (KChar 'j') [] -> EvKey (KDown) []
|
||||||
}
|
_ -> ev
|
||||||
-- continue =<< handleEventLensed ui someLens ev
|
newitems <- handleEvent ev' (scr ^. asList)
|
||||||
|
continue $ ui{aScreen=scr & asList .~ newitems
|
||||||
|
& asSelectedAccount .~ selacct
|
||||||
|
}
|
||||||
|
-- continue =<< handleEventLensed ui someLens ev
|
||||||
|
|
||||||
where
|
where
|
||||||
-- Encourage a more stable scroll position when toggling list items.
|
-- Encourage a more stable scroll position when toggling list items.
|
||||||
|
|||||||
@ -186,7 +186,7 @@ rsDraw UIState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}}
|
|||||||
Minibuffer ed -> minibuffer ed
|
Minibuffer ed -> minibuffer ed
|
||||||
_ -> quickhelp
|
_ -> quickhelp
|
||||||
quickhelp = borderKeysStr [
|
quickhelp = borderKeysStr [
|
||||||
("h", "help")
|
("?", "help")
|
||||||
,("left", "back")
|
,("left", "back")
|
||||||
,("right", "transaction")
|
,("right", "transaction")
|
||||||
,("/", "filter")
|
,("/", "filter")
|
||||||
@ -247,7 +247,7 @@ rsHandle ui@UIState{
|
|||||||
case ev of
|
case ev of
|
||||||
EvKey (KChar 'q') [] -> halt ui
|
EvKey (KChar 'q') [] -> halt ui
|
||||||
EvKey KEsc [] -> continue $ resetScreens d ui
|
EvKey KEsc [] -> continue $ resetScreens d ui
|
||||||
EvKey (KChar c) [] | c `elem` ['h','?'] -> continue $ setMode Help ui
|
EvKey (KChar c) [] | c `elem` ['?'] -> continue $ setMode Help ui
|
||||||
EvKey (KChar 'g') [] -> liftIO (uiReloadJournalIfChanged copts d j ui) >>= continue
|
EvKey (KChar 'g') [] -> liftIO (uiReloadJournalIfChanged copts d j ui) >>= continue
|
||||||
EvKey (KChar 'a') [] -> suspendAndResume $ clearScreen >> setCursorPosition 0 0 >> add copts j >> uiReloadJournalIfChanged copts d j ui
|
EvKey (KChar 'a') [] -> suspendAndResume $ clearScreen >> setCursorPosition 0 0 >> add copts j >> uiReloadJournalIfChanged copts d j ui
|
||||||
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor pos f) >> uiReloadJournalIfChanged copts d j ui
|
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor pos f) >> uiReloadJournalIfChanged copts d j ui
|
||||||
@ -262,8 +262,8 @@ rsHandle ui@UIState{
|
|||||||
EvKey (KChar 'R') [] -> scrollTop >> (continue $ regenerateScreens j d $ toggleReal ui)
|
EvKey (KChar 'R') [] -> scrollTop >> (continue $ regenerateScreens j d $ toggleReal ui)
|
||||||
EvKey (KChar '/') [] -> (continue $ regenerateScreens j d $ showMinibuffer ui)
|
EvKey (KChar '/') [] -> (continue $ regenerateScreens j d $ showMinibuffer ui)
|
||||||
EvKey k [] | k `elem` [KBS, KDel] -> (continue $ regenerateScreens j d $ resetFilter ui)
|
EvKey k [] | k `elem` [KBS, KDel] -> (continue $ regenerateScreens j d $ resetFilter ui)
|
||||||
EvKey (KLeft) [] -> continue $ popScreen ui
|
EvKey k [] | k `elem` [KLeft, KChar 'h'] -> continue $ popScreen ui
|
||||||
EvKey k [] | k `elem` [KRight, KEnter] -> do
|
EvKey k [] | k `elem` [KRight, KChar 'l', KEnter] -> do
|
||||||
case listSelectedElement rsList of
|
case listSelectedElement rsList of
|
||||||
Just (_, RegisterScreenItem{rsItemTransaction=t}) ->
|
Just (_, RegisterScreenItem{rsItemTransaction=t}) ->
|
||||||
let
|
let
|
||||||
@ -276,9 +276,14 @@ rsHandle ui@UIState{
|
|||||||
,tsAccount=rsAccount} ui
|
,tsAccount=rsAccount} ui
|
||||||
Nothing -> continue ui
|
Nothing -> continue ui
|
||||||
-- fall through to the list's event handler (handles [pg]up/down)
|
-- fall through to the list's event handler (handles [pg]up/down)
|
||||||
ev -> do newitems <- handleEvent ev rsList
|
ev -> do
|
||||||
continue ui{aScreen=s{rsList=newitems}}
|
let ev' = case ev of
|
||||||
-- continue =<< handleEventLensed ui someLens ev
|
EvKey (KChar 'k') [] -> EvKey (KUp) []
|
||||||
|
EvKey (KChar 'j') [] -> EvKey (KDown) []
|
||||||
|
_ -> ev
|
||||||
|
newitems <- handleEvent ev' rsList
|
||||||
|
continue ui{aScreen=s{rsList=newitems}}
|
||||||
|
-- continue =<< handleEventLensed ui someLens ev
|
||||||
where
|
where
|
||||||
-- Encourage a more stable scroll position when toggling list items (cf AccountsScreen.hs)
|
-- Encourage a more stable scroll position when toggling list items (cf AccountsScreen.hs)
|
||||||
scrollTop = vScrollToBeginning $ viewportScroll "register"
|
scrollTop = vScrollToBeginning $ viewportScroll "register"
|
||||||
|
|||||||
@ -89,7 +89,7 @@ tsDraw UIState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}}
|
|||||||
-- Minibuffer ed -> minibuffer ed
|
-- Minibuffer ed -> minibuffer ed
|
||||||
_ -> quickhelp
|
_ -> quickhelp
|
||||||
quickhelp = borderKeysStr [
|
quickhelp = borderKeysStr [
|
||||||
("h", "help")
|
("?", "help")
|
||||||
,("left", "back")
|
,("left", "back")
|
||||||
,("up/down", "prev/next")
|
,("up/down", "prev/next")
|
||||||
--,("ESC", "cancel/top")
|
--,("ESC", "cancel/top")
|
||||||
@ -124,7 +124,7 @@ tsHandle ui@UIState{aScreen=s@TransactionScreen{tsTransaction=(i,t)
|
|||||||
case ev of
|
case ev of
|
||||||
EvKey (KChar 'q') [] -> halt ui
|
EvKey (KChar 'q') [] -> halt ui
|
||||||
EvKey KEsc [] -> continue $ resetScreens d ui
|
EvKey KEsc [] -> continue $ resetScreens d ui
|
||||||
EvKey (KChar c) [] | c `elem` ['h','?'] -> continue $ setMode Help ui
|
EvKey (KChar c) [] | c `elem` ['?'] -> continue $ setMode Help ui
|
||||||
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor pos f) >> uiReloadJournalIfChanged copts d j ui
|
EvKey (KChar 'E') [] -> suspendAndResume $ void (runEditor pos f) >> uiReloadJournalIfChanged copts d j ui
|
||||||
where
|
where
|
||||||
(pos,f) = let GenericSourcePos f l c = tsourcepos t in (Just (l, Just c),f)
|
(pos,f) = let GenericSourcePos f l c = tsourcepos t in (Just (l, Just c),f)
|
||||||
@ -160,9 +160,9 @@ tsHandle ui@UIState{aScreen=s@TransactionScreen{tsTransaction=(i,t)
|
|||||||
-- EvKey (KChar 'E') [] -> continue $ regenerateScreens j d $ stToggleEmpty ui
|
-- EvKey (KChar 'E') [] -> continue $ regenerateScreens j d $ stToggleEmpty ui
|
||||||
-- EvKey (KChar 'C') [] -> continue $ regenerateScreens j d $ stToggleCleared ui
|
-- EvKey (KChar 'C') [] -> continue $ regenerateScreens j d $ stToggleCleared ui
|
||||||
-- EvKey (KChar 'R') [] -> continue $ regenerateScreens j d $ stToggleReal ui
|
-- EvKey (KChar 'R') [] -> continue $ regenerateScreens j d $ stToggleReal ui
|
||||||
EvKey KUp [] -> continue $ regenerateScreens j d ui{aScreen=s{tsTransaction=(iprev,tprev)}}
|
EvKey k [] | k `elem` [KUp, KChar 'k'] -> continue $ regenerateScreens j d ui{aScreen=s{tsTransaction=(iprev,tprev)}}
|
||||||
EvKey KDown [] -> continue $ regenerateScreens j d ui{aScreen=s{tsTransaction=(inext,tnext)}}
|
EvKey k [] | k `elem` [KDown, KChar 'j'] -> continue $ regenerateScreens j d ui{aScreen=s{tsTransaction=(inext,tnext)}}
|
||||||
EvKey KLeft [] -> continue ui''
|
EvKey k [] | k `elem` [KLeft, KChar 'h'] -> continue ui''
|
||||||
where
|
where
|
||||||
ui'@UIState{aScreen=scr} = popScreen ui
|
ui'@UIState{aScreen=scr} = popScreen ui
|
||||||
ui'' = ui'{aScreen=rsSelect (fromIntegral i) scr}
|
ui'' = ui'{aScreen=rsSelect (fromIntegral i) scr}
|
||||||
|
|||||||
@ -34,25 +34,25 @@ helpDialog =
|
|||||||
Widget Fixed Fixed $ do
|
Widget Fixed Fixed $ do
|
||||||
c <- getContext
|
c <- getContext
|
||||||
render $
|
render $
|
||||||
renderDialog (dialog "help" (Just "Help (h/ESC to close)") Nothing (c^.availWidthL - 2)) $ -- (Just (0,[("ok",())]))
|
renderDialog (dialog "help" (Just "Help (?/LEFT/ESC to close)") Nothing (c^.availWidthL - 2)) $ -- (Just (0,[("ok",())]))
|
||||||
padTopBottom 1 $ padLeftRight 1 $
|
padTopBottom 1 $ padLeftRight 1 $
|
||||||
vBox [
|
vBox [
|
||||||
hBox [
|
hBox [
|
||||||
padLeftRight 1 $
|
padLeftRight 1 $
|
||||||
vBox [
|
vBox [
|
||||||
str "MISC"
|
str "NAVIGATION"
|
||||||
,renderKey ("h", "toggle help")
|
,renderKey ("UP/DOWN/k/j/PGUP/PGDN/HOME/END", "")
|
||||||
|
,str " move selection"
|
||||||
|
,renderKey ("RIGHT/l/ENTER", "drill down")
|
||||||
|
,renderKey ("LEFT/h", "previous screen")
|
||||||
|
,renderKey ("ESC", "cancel / reset")
|
||||||
|
,str " "
|
||||||
|
,str "MISC"
|
||||||
|
,renderKey ("?", "toggle help")
|
||||||
,renderKey ("a", "add transaction")
|
,renderKey ("a", "add transaction")
|
||||||
,renderKey ("E", "open editor")
|
,renderKey ("E", "open editor")
|
||||||
,renderKey ("g", "reload data")
|
,renderKey ("g", "reload data")
|
||||||
,renderKey ("q", "quit")
|
,renderKey ("q", "quit")
|
||||||
,str " "
|
|
||||||
,str "NAVIGATION"
|
|
||||||
,renderKey ("UP/DOWN/PGUP/PGDN/HOME/END", "")
|
|
||||||
,str " move selection"
|
|
||||||
,renderKey ("RIGHT/ENTER", "drill down")
|
|
||||||
,renderKey ("LEFT", "previous screen")
|
|
||||||
,renderKey ("ESC", "cancel / reset")
|
|
||||||
]
|
]
|
||||||
,padLeftRight 1 $
|
,padLeftRight 1 $
|
||||||
vBox [
|
vBox [
|
||||||
@ -89,7 +89,7 @@ helpDialog =
|
|||||||
helpHandle :: UIState -> Event -> EventM (Next UIState)
|
helpHandle :: UIState -> Event -> EventM (Next UIState)
|
||||||
helpHandle ui ev =
|
helpHandle ui ev =
|
||||||
case ev of
|
case ev of
|
||||||
EvKey k [] | k `elem` [KEsc, KChar 'h', KChar '?'] -> continue $ setMode Normal ui
|
EvKey k [] | k `elem` [KEsc, KLeft, KChar 'h', KChar '?'] -> continue $ setMode Normal ui
|
||||||
EvKey (KChar 't') [] -> suspendAndResume $ runHelp >> return (setMode Normal ui)
|
EvKey (KChar 't') [] -> suspendAndResume $ runHelp >> return (setMode Normal ui)
|
||||||
EvKey (KChar 'm') [] -> suspendAndResume $ runMan >> return (setMode Normal ui)
|
EvKey (KChar 'm') [] -> suspendAndResume $ runMan >> return (setMode Normal ui)
|
||||||
EvKey (KChar 'i') [] -> suspendAndResume $ runInfo >> return (setMode Normal ui)
|
EvKey (KChar 'i') [] -> suspendAndResume $ runInfo >> return (setMode Normal ui)
|
||||||
|
|||||||
@ -217,15 +217,17 @@ be "TAG:multi:level:account:name".
|
|||||||
.RE
|
.RE
|
||||||
.SH KEYS
|
.SH KEYS
|
||||||
.PP
|
.PP
|
||||||
\f[C]h\f[] shows a help dialog listing all keys.
|
\f[C]?\f[] shows a help dialog listing all keys.
|
||||||
(Some but not all of these also appear in the quick help at the bottom
|
(Some but not all of these also appear in the quick help at the bottom
|
||||||
of each screen.) Press \f[C]h\f[] again (or \f[C]ESCAPE\f[]) to close
|
of each screen.) Press \f[C]?\f[] again (or \f[C]ESCAPE\f[], or
|
||||||
it.
|
\f[C]LEFT\f[]) to close it.
|
||||||
.PP
|
.PP
|
||||||
The cursor keys navigate: \f[C]right\f[] (or \f[C]enter\f[]) goes
|
The cursor keys navigate: \f[C]right\f[] (or \f[C]enter\f[]) goes
|
||||||
deeper, \f[C]left\f[] returns to the previous screen,
|
deeper, \f[C]left\f[] returns to the previous screen,
|
||||||
\f[C]up\f[]/\f[C]down\f[]/\f[C]page\ up\f[]/\f[C]page\ down\f[]/\f[C]home\f[]/\f[C]end\f[]
|
\f[C]up\f[]/\f[C]down\f[]/\f[C]page\ up\f[]/\f[C]page\ down\f[]/\f[C]home\f[]/\f[C]end\f[]
|
||||||
move up and down through lists.
|
move up and down through lists.
|
||||||
|
Vi\-style \f[C]h\f[]/\f[C]j\f[]/\f[C]k\f[]/\f[C]l\f[] movement keys are
|
||||||
|
also supported.
|
||||||
.PP
|
.PP
|
||||||
\f[C]/\f[] lets you set or change the filter query, which limits the
|
\f[C]/\f[] lets you set or change the filter query, which limits the
|
||||||
data shown on most screens (in addition to the quick filters described
|
data shown on most screens (in addition to the quick filters described
|
||||||
|
|||||||
@ -152,13 +152,14 @@ File: hledger-ui.1.info, Node: KEYS, Next: SCREENS, Prev: OPTIONS, Up: Top
|
|||||||
2 KEYS
|
2 KEYS
|
||||||
******
|
******
|
||||||
|
|
||||||
`h' shows a help dialog listing all keys. (Some but not all of these
|
`?' shows a help dialog listing all keys. (Some but not all of these
|
||||||
also appear in the quick help at the bottom of each screen.) Press `h'
|
also appear in the quick help at the bottom of each screen.) Press `?'
|
||||||
again (or `ESCAPE') to close it.
|
again (or `ESCAPE', or `LEFT') to close it.
|
||||||
|
|
||||||
The cursor keys navigate: `right' (or `enter') goes deeper, `left'
|
The cursor keys navigate: `right' (or `enter') goes deeper, `left'
|
||||||
returns to the previous screen, `up'/`down'/`page up'/`page
|
returns to the previous screen, `up'/`down'/`page up'/`page
|
||||||
down'/`home'/`end' move up and down through lists.
|
down'/`home'/`end' move up and down through lists. Vi-style
|
||||||
|
`h'/`j'/`k'/`l' movement keys are also supported.
|
||||||
|
|
||||||
`/' lets you set or change the filter query, which limits the data
|
`/' lets you set or change the filter query, which limits the data
|
||||||
shown on most screens (in addition to the quick filters described
|
shown on most screens (in addition to the quick filters described
|
||||||
@ -334,15 +335,15 @@ Node: OPTIONS825
|
|||||||
Ref: #options924
|
Ref: #options924
|
||||||
Node: KEYS3800
|
Node: KEYS3800
|
||||||
Ref: #keys3897
|
Ref: #keys3897
|
||||||
Node: SCREENS5391
|
Node: SCREENS5461
|
||||||
Ref: #screens5478
|
Ref: #screens5548
|
||||||
Node: Accounts screen5568
|
Node: Accounts screen5638
|
||||||
Ref: #accounts-screen5698
|
Ref: #accounts-screen5768
|
||||||
Node: Register screen7003
|
Node: Register screen7073
|
||||||
Ref: #register-screen7160
|
Ref: #register-screen7230
|
||||||
Node: Transaction screen8981
|
Node: Transaction screen9051
|
||||||
Ref: #transaction-screen9141
|
Ref: #transaction-screen9211
|
||||||
Node: Error screen10008
|
Node: Error screen10078
|
||||||
Ref: #error-screen10132
|
Ref: #error-screen10202
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|||||||
@ -75,14 +75,15 @@ _reportingoptions_
|
|||||||
|
|
||||||
# KEYS
|
# KEYS
|
||||||
|
|
||||||
`h` shows a help dialog listing all keys.
|
`?` shows a help dialog listing all keys.
|
||||||
(Some but not all of these also appear in the quick help at the bottom of each screen.)
|
(Some but not all of these also appear in the quick help at the bottom of each screen.)
|
||||||
Press `h` again (or `ESCAPE`) to close it.
|
Press `?` again (or `ESCAPE`, or `LEFT`) to close it.
|
||||||
|
|
||||||
The cursor keys navigate:
|
The cursor keys navigate:
|
||||||
`right` (or `enter`) goes deeper,
|
`right` (or `enter`) goes deeper,
|
||||||
`left` returns to the previous screen,
|
`left` returns to the previous screen,
|
||||||
`up`/`down`/`page up`/`page down`/`home`/`end` move up and down through lists.
|
`up`/`down`/`page up`/`page down`/`home`/`end` move up and down through lists.
|
||||||
|
Vi-style `h`/`j`/`k`/`l` movement keys are also supported.
|
||||||
|
|
||||||
`/` lets you set or change the [filter query](/hledger.html#queries),
|
`/` lets you set or change the [filter query](/hledger.html#queries),
|
||||||
which limits the data shown on most screens (in addition to the quick
|
which limits the data shown on most screens (in addition to the quick
|
||||||
|
|||||||
@ -141,36 +141,36 @@ OPTIONS
|
|||||||
name will be "TAG:multi:level:account:name".
|
name will be "TAG:multi:level:account:name".
|
||||||
|
|
||||||
KEYS
|
KEYS
|
||||||
h shows a help dialog listing all keys. (Some but not all of these
|
? shows a help dialog listing all keys. (Some but not all of these
|
||||||
also appear in the quick help at the bottom of each screen.) Press h
|
also appear in the quick help at the bottom of each screen.) Press ?
|
||||||
again (or ESCAPE) to close it.
|
again (or ESCAPE, or LEFT) to close it.
|
||||||
|
|
||||||
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/page up/page down/home/end move up and
|
the previous screen, up/down/page up/page down/home/end move up and
|
||||||
down through lists.
|
down through lists. Vi-style h/j/k/l movement keys are also supported.
|
||||||
|
|
||||||
/ lets you set or change the filter query, which limits the data shown
|
/ lets you set or change the filter query, which limits the data shown
|
||||||
on most screens (in addition to the quick filters described below).
|
on most screens (in addition to the quick filters described below).
|
||||||
While editing the query you can use typical command-line edit keys
|
While editing the query you can use typical command-line edit keys
|
||||||
(ctrl-a/e/k), press enter to set the new filter, or press escape to
|
(ctrl-a/e/k), press enter to set the new filter, or press escape to
|
||||||
cancel.
|
cancel.
|
||||||
|
|
||||||
BACKSPACE or DELETE clears any filters in effect.
|
BACKSPACE or DELETE clears any filters in effect.
|
||||||
|
|
||||||
ESCAPE removes any filters currently in effect, and jumps to the top
|
ESCAPE removes any filters currently in effect, and jumps to the top
|
||||||
screen. Or, it cancels a minibuffer edit or help dialog if one is
|
screen. Or, it cancels a minibuffer edit or help dialog if one is
|
||||||
active.
|
active.
|
||||||
|
|
||||||
g reloads from the data file(s) and updates the current screen and any
|
g reloads from the data file(s) and updates the current screen and any
|
||||||
previous screens. (With large files, there can be a noticeable pause.)
|
previous screens. (With large files, there can be a noticeable pause.)
|
||||||
|
|
||||||
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.
|
file. This allows some basic data entry.
|
||||||
|
|
||||||
E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacs) on the
|
E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacs) on the
|
||||||
journal file. When invoked from the register and transaction screens,
|
journal file. When invoked from the register and transaction screens,
|
||||||
the cursor will be positioned at the current transaction. When invoked
|
the cursor will be positioned at the current transaction. When invoked
|
||||||
from the error screen, the cursor will be at the error location (if
|
from the error screen, the cursor will be at the error location (if
|
||||||
possible).
|
possible).
|
||||||
|
|
||||||
q quits the application.
|
q quits the application.
|
||||||
@ -179,31 +179,31 @@ KEYS
|
|||||||
|
|
||||||
SCREENS
|
SCREENS
|
||||||
Accounts screen
|
Accounts screen
|
||||||
This is normally the first screen displayed. It lists accounts and
|
This is normally the first screen displayed. It lists accounts and
|
||||||
their balances, like hledger's balance command. By default, it shows
|
their balances, like hledger's balance command. By default, it shows
|
||||||
all accounts and their latest ending balances. if you specify a query
|
all accounts and their latest ending balances. if you specify a query
|
||||||
on the command line, it shows just the matched accounts and the bal-
|
on the command line, it shows just the matched accounts and the bal-
|
||||||
ances from matched transactions.
|
ances from matched transactions.
|
||||||
|
|
||||||
Account names are normally indented to show the hierarchy (tree mode).
|
Account names are normally indented to show the hierarchy (tree mode).
|
||||||
To see less detail, set a depth limit by pressing a number key, 1 to 9.
|
To see less detail, set a depth limit by pressing a number key, 1 to 9.
|
||||||
0 shows even less detail, collapsing all accounts to a single total. -
|
0 shows even less detail, collapsing all accounts to a single total. -
|
||||||
and + (or =) decrease and increase the depth limit. To remove the
|
and + (or =) decrease and increase the depth limit. To remove the
|
||||||
depth limit, set it higher than the maximum account depth, or press
|
depth limit, set it higher than the maximum account depth, or press
|
||||||
ESCAPE.
|
ESCAPE.
|
||||||
|
|
||||||
F toggles flat mode on and off. In flat mode, accounts are listed
|
F toggles flat mode on and off. In flat mode, accounts are listed
|
||||||
without indentation (and account registers will exclude subaccounts,
|
without indentation (and account registers will exclude subaccounts,
|
||||||
see below).
|
see below).
|
||||||
|
|
||||||
C toggles cleared mode, in which uncleared transactions and postings
|
C toggles cleared mode, in which uncleared transactions and postings
|
||||||
are not shown. U toggles uncleared mode, in which only uncleared
|
are not shown. U toggles uncleared mode, in which only uncleared
|
||||||
transactions/postings are shown.
|
transactions/postings are shown.
|
||||||
|
|
||||||
R toggles real mode, in which virtual postings are ignored.
|
R toggles real mode, in which virtual postings are ignored.
|
||||||
|
|
||||||
Z toggles nonzero mode, in which only accounts with nonzero balances
|
Z toggles nonzero mode, in which only accounts with nonzero balances
|
||||||
are shown (hledger-ui shows zero items by default, unlike command-line
|
are shown (hledger-ui shows zero items by default, unlike command-line
|
||||||
hledger).
|
hledger).
|
||||||
|
|
||||||
Press right or enter to view an account's transactions register.
|
Press right or enter to view an account's transactions register.
|
||||||
@ -212,15 +212,15 @@ SCREENS
|
|||||||
This screen shows the transactions affecting a particular account, like
|
This screen shows the transactions affecting a particular account, like
|
||||||
a check register. Each line represents one transaction and shows:
|
a check register. Each line represents one transaction and shows:
|
||||||
|
|
||||||
o the other account(s) involved, in abbreviated form. (If there are
|
o the other account(s) involved, in abbreviated form. (If there are
|
||||||
both real and virtual postings, it shows only the accounts affected
|
both real and virtual postings, it shows only the accounts affected
|
||||||
by real postings.)
|
by real postings.)
|
||||||
|
|
||||||
o the overall change to the current account's balance; positive for an
|
o the overall change to the current account's balance; positive for an
|
||||||
inflow to this account, negative for an outflow.
|
inflow to this account, negative for an outflow.
|
||||||
|
|
||||||
o the current account's historic balance (if no query other than a date
|
o the current account's historic balance (if no query other than a date
|
||||||
limit is in effect) or the running total starting from zero (other-
|
limit is in effect) or the running total starting from zero (other-
|
||||||
wise), after the transaction.
|
wise), after the transaction.
|
||||||
Eg, these will show historic balances:
|
Eg, these will show historic balances:
|
||||||
|
|
||||||
@ -235,45 +235,45 @@ SCREENS
|
|||||||
$ hledger-ui --begin 'this month' desc:market
|
$ hledger-ui --begin 'this month' desc:market
|
||||||
$ hledger-ui --register checking --cleared
|
$ hledger-ui --register checking --cleared
|
||||||
|
|
||||||
Normally the register screen shows transactions in the current account
|
Normally the register screen shows transactions in the current account
|
||||||
and any of its subaccounts (inclusive mode). If it was entered from
|
and any of its subaccounts (inclusive mode). If it was entered from
|
||||||
accounts screen in flat mode, it shows transactions affecting this
|
accounts screen in flat mode, it shows transactions affecting this
|
||||||
account specifically, without considering subaccounts (exclusive mode).
|
account specifically, without considering subaccounts (exclusive mode).
|
||||||
As on the accounts screen you can toggle this with the F key.
|
As on the accounts screen you can toggle this with the F key.
|
||||||
|
|
||||||
C toggles cleared mode, in which uncleared transactions and postings
|
C toggles cleared mode, in which uncleared transactions and postings
|
||||||
are not shown. U toggles uncleared mode, in which only uncleared
|
are not shown. U toggles uncleared mode, in which only uncleared
|
||||||
transactions/postings are shown.
|
transactions/postings are shown.
|
||||||
|
|
||||||
R toggles real mode, in which virtual postings are ignored.
|
R toggles real mode, in which virtual postings are ignored.
|
||||||
|
|
||||||
Z toggles nonzero mode, in which only transactions posting a nonzero
|
Z toggles nonzero mode, in which only transactions posting a nonzero
|
||||||
change are shown (hledger-ui shows zero items by default, unlike com-
|
change are shown (hledger-ui shows zero items by default, unlike com-
|
||||||
mand-line hledger).
|
mand-line hledger).
|
||||||
|
|
||||||
Press right (or enter) to view the selected transaction in detail.
|
Press right (or enter) to view the selected transaction in detail.
|
||||||
|
|
||||||
Transaction screen
|
Transaction screen
|
||||||
This screen shows a single transaction, as a general journal entry,
|
This screen shows a single transaction, as a general journal entry,
|
||||||
similar to hledger's print command and journal format (hledger_jour-
|
similar to hledger's print command and journal format (hledger_jour-
|
||||||
nal(5)).
|
nal(5)).
|
||||||
|
|
||||||
The transaction's date(s) and any cleared flag, transaction code,
|
The transaction's date(s) and any cleared flag, transaction code,
|
||||||
description, comments, along with all of its account postings are
|
description, comments, along with all of its account postings are
|
||||||
shown. Simple transactions have two postings, but there can be more
|
shown. Simple transactions have two postings, but there can be more
|
||||||
(or in certain cases, fewer).
|
(or in certain cases, fewer).
|
||||||
|
|
||||||
up and down will step through all transactions listed in the previous
|
up and down will step through all transactions listed in the previous
|
||||||
account register screen. In the title bar, the numbers in parentheses
|
account register screen. In the title bar, the numbers in parentheses
|
||||||
show your position within that account register. They will vary
|
show your position within that account register. They will vary
|
||||||
depending on which account register you came from (remember most trans-
|
depending on which account register you came from (remember most trans-
|
||||||
actions appear in multiple account registers). The #N number preceding
|
actions appear in multiple account registers). The #N number preceding
|
||||||
them is the transaction's position within the complete unfiltered jour-
|
them is the transaction's position within the complete unfiltered jour-
|
||||||
nal, which is a more stable id (at least until the next reload).
|
nal, which is a more stable id (at least until the next reload).
|
||||||
|
|
||||||
Error screen
|
Error screen
|
||||||
This screen will appear if there is a problem, such as a parse 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
|
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
|
again to reload and resume normal operation. (Or, you can press escape
|
||||||
to cancel the reload attempt.)
|
to cancel the reload attempt.)
|
||||||
|
|
||||||
@ -281,17 +281,17 @@ ENVIRONMENT
|
|||||||
COLUMNS The screen width to use. Default: the full terminal width.
|
COLUMNS The screen width to use. Default: the full terminal width.
|
||||||
|
|
||||||
LEDGER_FILE The journal file path when not specified with -f. Default:
|
LEDGER_FILE The journal file path when not specified with -f. Default:
|
||||||
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
|
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
|
||||||
nal).
|
nal).
|
||||||
|
|
||||||
FILES
|
FILES
|
||||||
Reads data from one or more files in hledger journal, timeclock, time-
|
Reads data from one or more files in hledger journal, timeclock, time-
|
||||||
dot, or CSV format specified with -f, or $LEDGER_FILE, or
|
dot, or CSV format specified with -f, or $LEDGER_FILE, or
|
||||||
$HOME/.hledger.journal (on windows, perhaps
|
$HOME/.hledger.journal (on windows, perhaps
|
||||||
C:/Users/USER/.hledger.journal).
|
C:/Users/USER/.hledger.journal).
|
||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
The need to precede options with -- when invoked from hledger is awk-
|
The need to precede options with -- when invoked from hledger is awk-
|
||||||
ward.
|
ward.
|
||||||
|
|
||||||
-f- doesn't work (hledger-ui can't read from stdin).
|
-f- doesn't work (hledger-ui can't read from stdin).
|
||||||
@ -302,14 +302,14 @@ BUGS
|
|||||||
which may cause a noticeable pause. Also there is no visual indication
|
which may cause a noticeable pause. Also there is no visual indication
|
||||||
that this is in progress.
|
that this is in progress.
|
||||||
|
|
||||||
The register screen's switching between historic balance and running
|
The register screen's switching between historic balance and running
|
||||||
total based on query arguments may be confusing, and there is no column
|
total based on query arguments may be confusing, and there is no column
|
||||||
heading to indicate which is being displayed.
|
heading to indicate which is being displayed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
REPORTING BUGS
|
REPORTING BUGS
|
||||||
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
|
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
|
||||||
or hledger mail list)
|
or hledger mail list)
|
||||||
|
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ COPYRIGHT
|
|||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
|
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
|
||||||
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
|
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
|
||||||
dot(5), ledger(1)
|
dot(5), ledger(1)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user