mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-17 10:21:30 +02:00
Add support for control-A and control-E shortcuts similar to GNU readline
This commit is contained in:
@ -2089,6 +2089,14 @@ func testTui_general(t *testing.T, onlineStatus OnlineStatus) {
|
||||
out = strings.Split(stripTuiCommandPrefix(t, out), "\n")[0]
|
||||
testutils.CompareGoldens(t, out, "TestTui-SelectAndCd")
|
||||
|
||||
// Test jumping around the cursor via shortcuts
|
||||
out = captureTerminalOutput(t, tester, []string{
|
||||
"hishtory SPACE tquery ENTER",
|
||||
"foo C-a AAA C-e ZZZ",
|
||||
})
|
||||
out = strings.Split(stripTuiCommandPrefix(t, out), "\n")[0]
|
||||
testutils.CompareGoldens(t, out, "TestTui-JumpCursor")
|
||||
|
||||
// Test the User column
|
||||
tester.RunInteractiveShell(t, `hishtory config-add displayed-columns User`)
|
||||
out = captureTerminalOutput(t, tester, []string{
|
||||
|
Reference in New Issue
Block a user