sindresorhus / fkill-cli

Fabulously kill processes. Cross-platform.
MIT License
6.88k stars 159 forks source link

Escape key? #4

Closed dthree closed 9 years ago

dthree commented 9 years ago

Perhaps there should be a key handler for an escape key. I mean, control + c works, but I think there should be something more graceful, such as also adding support for q, similar to less and top.

Otherwise, love it!

sindresorhus commented 9 years ago

You can now press the Esc button to gracefully exit. I think that is a more common convention than q. I also want to support search in the future, so better not use q. It currently doesn't work correctly on Node 4.0, though. At least on OS X. You have to press Esc 3 times for it to work. Might be related to: https://github.com/nodejs/node/issues/2890 or https://github.com/nodejs/node/issues/2996 It works correctly in Node 0.12.

@silverwind Thoughts?

Any other suggestion welcome! I want to be super good :)

dthree commented 9 years ago

Thanks! I like escape.

That's funny. I literally ran into this same escape problem 3 days ago in doing vorpal-less.