Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for keyboard input #67

Open
georgecrawford opened this issue Sep 26, 2017 · 2 comments
Open

Support for keyboard input #67

georgecrawford opened this issue Sep 26, 2017 · 2 comments
Labels
new feature Requests or requires a new feature

Comments

@georgecrawford
Copy link

This is a nice-to-have rather than an integral requirement for the tool, but I would be delighted if watchexec would incorporate the keyboard command listeners from tools like entr:

entr listens for keyboard input and responds to the following commands:

     SPACE       Execute the utility immediately.  If the `-r' option is set
                 this will terminate and restart the child process as if a
                 file change event had occurred.

     q           Quit; equivalent pressing Ctrl-C.

or nodemon:

Whilst nodemon is running, if you need to manually restart your application, 
instead of stopping and restart nodemon, you can simply type rs with a 
carriage return, and nodemon will restart your process.

This would take the developer experience to the next level!

Thanks again for a fantastic tool - I evaluated about 10 different file watch utilities, and this has the best combination of API, performance and functionality I've found.

@mattgreen
Copy link
Collaborator

Thanks for the kind words.

I like this idea, but currently the way it handles async is pretty ad-hoc at the moment. I'd like to move to Futures so I can easily wait on several sources of input easily, but that might not be until 2.0.

@mattgreen mattgreen added this to the 2.0 milestone Oct 3, 2017
@passcod passcod added the new feature Requests or requires a new feature label Oct 29, 2019
@passcod
Copy link
Member

passcod commented Jul 15, 2021

Thinking about this today: there should also be a key to pause running the command on changes. Unsure yet if it should be unpaused on the same key only or unpaused also by whatever key does a manual run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Requests or requires a new feature
Projects
None yet
Development

No branches or pull requests

3 participants