top | item 46467277

(no title)

CBLT | 1 month ago

If you're following a pipe (such as `kubectl logs | less +F`), <C-c> is sent to all processes in a pipeline, so it stops less from following and it stops the other process entirely. Then you can't start following again with F, or load more data in with G.

Less provides an alternative of <C-x> to stop following, but that is intercepted by most shells.

discuss

order

vbezhenar|1 month ago

> Less provides an alternative of <C-x> to stop following, but that is intercepted by most shells.

WoW, thanks a lot! That was my pain for many years. C-x works in Gnome Console just fine.

mananaysiempre|1 month ago

Funnily enough, it literally tells you right there on the bottom line: “Waiting for data... (^X or interrupt to abort)”. No shame in not noticing, just another case of blindness to long-familliar messages I guess.

mananaysiempre|1 month ago

By the shell or by the kernel’s terminal discipline or by the terminal emulator? AFAIU the shell is basically out of the picture while `less` is running.

CBLT|1 month ago

I can <C-z> while less is running to background that process using the shell, so the shell is clearly not completely gone.

I might be misremembering, but I think I just had to rebind <C-x> in zsh to get less working.