tstack / lnav

Log file navigator
http://lnav.org
BSD 2-Clause "Simplified" License
8.07k stars 324 forks source link

Esc key doesn't abort #1284

Open xuyangyuio opened 4 months ago

xuyangyuio commented 4 months ago

ESC key doesn't abort the search or command, only Ctrl-] does.

avi-cenna commented 4 months ago

What is your operating system, terminal emulator, and version of lnav?

tstack commented 4 months ago

@xuyangyuio can you provide some more details. Things seem to work for me and others, so it's hard to know what the issue might be.

YasserKa commented 2 months ago

EDIT: The behavior below can be reproduced by some configuration in readline. Note that this happens in Zsh as well even though it doesn't use readline. It's a separate issue from this one, so I opened another issue for it #1341

I have a similar issue. It's doing something odd. I press :123456789123456789 nothing appears in the command bar until 23456789, so :1234567891 aren't visible (same thing if I start with ;). I press <escape> and what I see 232 q:123456789123456789. If I press <enter> I get ✘ error: unknown command - 123456789123456789 which is to be expected, but the escape button and command bar don't seem to behave properly.

Linux 6.10.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 04 Sep 2024 15:16:37 +0000 x86_64 GNU/Linux

lnav --version
lnav 0.12.2

# Tried on 2 terminals
echo $TERM
alacritty
echo "$TERM"        
xterm-kitty
YasserKa commented 2 months ago

2024-09-11_18:32:25

This behavior can be reproduced. Check comment above.

xuyangyuio commented 2 months ago

I am on MacOS Monterey. Tried Iterm2/Kitty, bash/zsh, none of the 4 combinations worked. Nothing happens when \ key is pressed.

jvinet commented 1 month ago

I'll pile on... I notice the same behaviour here, using 0.12.2. For me, it happens when I shell into my Alpine-based Docker container and run lnav from there. Ctrl-] works but Esc does not.

The more irksome behaviour, and possibly related to this issue, is that the : key makes lnav immediately exit, leaving me unable to enter commands into lnav. 0.12.1 did not exhibit this problem.

TERM is set to xterm-256color.