tail/args: Fix parsing when -F is used together with --retry or --follow#4734
Conversation
|
@tertsdiepraam This pr is ready :) |
|
@tertsdiepraam Could you review, please? |
There was a problem hiding this comment.
please document the various cases
6dd28bb to
5cc3814
Compare
There was a problem hiding this comment.
Can't we match GNU by allowing retry multiple times?
There was a problem hiding this comment.
Sure. That's just the way it was before this pr and I wasn't sure. I think -F should be allowed also multiple times
There was a problem hiding this comment.
To be fully compliant with gnu's tail, I think we should set clap_builder::builder::Command::args_override_self to true globally for all arguments and not only for specific ones. Afaik, this is the way how they parse arguments. I could do this in another pr, maybe together with unit testing the arguments.
There was a problem hiding this comment.
Good idea! Let's do that separately indeed.
5cc3814 to
2f44fe5
Compare
2f44fe5 to
20e3297
Compare
This pr fixes the argument parsing when
-Fis used together with--retryor--follow.tail -F --retryshould not erase the implicit--followoption,tail -F --followshould not erase the implicit--retryflag etc.