lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Prevent q from quitting lnav

Open gerases opened this issue 1 year ago • 2 comments

Hi,

is it possible to prevent q from quitting lnav altogether. I keep doing it for some reason. Same about carl-c. Maybe a confirmation before quitting? Sorry if this has been asked before. Haven’t been able to find a solution for this for a long time. Otherwise, I love lnav. Thank you much.

gerases avatar Sep 29 '24 16:09 gerases

The key binding for q is defined here:

https://github.com/tstack/lnav/blob/4a203f8618450ff7a1a18bbac776daae7e103da8/src/keymaps/default-keymap.json#L178-L180

You can rebind with a command like the following:

:config /ui/keymap-defs/default/x71/command :echo Press Shift-Q to quit

tstack avatar Oct 01 '24 05:10 tstack

To me the issue with q quitting is that, it is the same key to close the overlay windows. I don't see any indication how many are left so might frequently quit one too many.

takeda avatar Oct 12 '24 07:10 takeda

@tstack, thank you very much for that solution! Exactly what I needed.

gerases avatar Oct 23 '24 20:10 gerases

@takeda Yes, I agree and had filed #1189 to track the issue with the stack of views not being shown. Since that one is open, I'm going to close this out.

tstack avatar Jan 27 '25 18:01 tstack

Is it possible to disable CTRL+C as well?

gerases avatar Nov 04 '25 19:11 gerases