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

Make --watch an option to select the watch engine #10

Merged
merged 2 commits into from
Sep 11, 2022

Conversation

atticus-sullivan
Copy link
Contributor

Background behind this is that for some reason fswatch doesn't work for me (strangely only in some directories, might be a problem with symlinks or so, but I didn't found out yet).

Thus I wanted to use inotifywait which isn't possible with the current wait engine check (if fswatch is installed it always is preferred over inotifywait).

Please check if I used your commandline options library correctly, because I'm not sure of this. And in addition I wonder if there is a way to perform some parameter validity check with your library (I didn't found one)?


If there is no such feature, I'd propose to add a new key to the option_spec table entries (e.g. valid_check) which could be a table with the allowed values or a function to manually check for validity. Then somewhere I now have placed the validity check for the watch option there could be a function check_paramters which then performs the validity check (after the color etc has been set for nice error messages).

In case you also think it would be worth to do so, further discussion/work should be in a new issue/pull request

@atticus-sullivan
Copy link
Contributor Author

Just checking on this PR. Are there any problems with these changes? / Opinions?

@minoki minoki merged commit c16509e into minoki:master Sep 11, 2022
@minoki
Copy link
Owner

minoki commented Sep 11, 2022

Looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants