csvlens icon indicating copy to clipboard operation
csvlens copied to clipboard

Add CTRLC support

Open zhiburt opened this issue 2 years ago • 2 comments

Hi @YS-L

I am not sure if it's already present. It just doesn't work on my end somehow.

Take care.

zhiburt avatar Oct 24 '22 19:10 zhiburt

Hi @zhiburt, thanks for reporting. Currently there is no action performed on CTRL-C. Do you mean the program should exit on CTRL-C? I wanted csvlens to behave similarly as the program less which doesn't exit on CTRL-C, so it didn't occur to me that it should be handled.

YS-L avatar Oct 26 '22 16:10 YS-L

I wanted csvlens to behave similarly as the program less which doesn't exit on CTRL-C, so it didn't occur to me that it should be handled.

Good cause :+1:

But at least for less CTRL_Z works :)

zhiburt avatar Oct 27 '22 06:10 zhiburt

In general CTRL+C should be handled, but here specifically might not be such a big deal. My guess would be if there are (now or in the future) operations/features which might be desirable to cancel, then it might be required. Long running operations would fall into this category. Some candidate issues perhaps related: #103: Stop output? Cancel the whole operation? #81: Stop streaming? #26: Kill child process?

pataquets avatar Oct 08 '24 18:10 pataquets

@zhiburt Also, IIRC, CTRL-Z is out of the program control as it's part of Bash's Job Control. See Job Control Basics (Bash Reference Manual).

pataquets avatar Oct 08 '24 18:10 pataquets