ReviewOS

also looking at this

den-shell/den

feat(line-editor): add Ctrl+P / Ctrl+N history navigation

#53
Merged chris wants to merge feat/line-editor-keybindings into main
1 file +8 -0
9 days ago

What

Adds the standard readline/emacs Ctrl+P (previous) / Ctrl+N (next) history bindings. Den only bound Up/Down arrows; Ctrl+P/N are constant muscle memory for bash/zsh users.

Both wire to the existing historyPrevious / historyNext, so they mirror the arrows exactly (including completion-state clearing).

Verification

  • zig build clean.
  • PTY test: after echo ALPHA then echo BETA, Ctrl+P recalls echo BETA and running it prints BETA.

8-line addition to the control-key dispatch in src/utils/terminal/line_editor.zig; no API changes.

1 changed file on the files tab, with 0 review threads.

Sign in to comment on this pull request.