Make --watch an option to select the watch engine #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 (iffswatch
is installed it always is preferred overinotifywait
).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 functioncheck_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