Re:Argbash: Bash argument parsing code generator
by faho on Wednesday March 23, 2022 @08:40AM
(#30777816)
GNU grep doesn't take a value for `-E`, so it interprets this as `grep -i -E -t`, which explains the error. It doesn't have a `-t` option.
I don't know of any grep that does take a value for `-E`.
It does support taking a value for `-f`, and it also does support that as the last option in a group:
grep -qf/path/to/file
works, even if path is something like "patterns" (see that "t" in there?).
>So, once again: what is "correct", when it comes to option handling? Your example was grep, but by the examples of other GNU tools, it only does an "approximation".
I believe you're simply mistaken about what options it takes, and which options take values, the parsing seems "correct".
I don't know of any grep that does take a value for `-E`.
It does support taking a value for `-f`, and it also does support that as the last option in a group:
works, even if path is something like "patterns" (see that "t" in there?).>So, once again: what is "correct", when it comes to option handling? Your example was grep, but by the examples of other GNU tools, it only does an "approximation".
I believe you're simply mistaken about what options it takes, and which options take values, the parsing seems "correct".