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
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