mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: Ctrl+D deletes char under cursor, only exits on empty input (bash/zsh behaviour)
This commit is contained in:
parent
1dcf79a864
commit
08d5c9c539
1 changed files with 9 additions and 3 deletions
8
cli.py
8
cli.py
|
|
@ -9557,7 +9557,13 @@ class HermesCLI:
|
|||
|
||||
@kb.add('c-d')
|
||||
def handle_ctrl_d(event):
|
||||
"""Handle Ctrl+D - exit."""
|
||||
"""Ctrl+D: delete char under cursor (standard readline behaviour).
|
||||
Only exit when the input is empty — same as bash/zsh.
|
||||
"""
|
||||
buf = event.app.current_buffer
|
||||
if buf.text:
|
||||
buf.delete()
|
||||
else:
|
||||
self._should_exit = True
|
||||
event.app.exit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue