Open sorairolake opened 1 month ago
I think this will allow --format to print possible values.
Hey! By print, do you mean --help
or shell autocompletion?
I think this will allow --format to print possible values.
Hey! By print, do you mean
--help
or shell autocompletion?
Yes, that's right.
I'm sorry, which one of these two? hahaha
@marcospb19 Both. -h
prints possible values, and --help
prints the help description (doc comments) in addition to this. For shell completion, possible values will be completed if supported. If the help description is supported it will also be printed.
To avoid breaking changes to --format
, it may be better to add new options rather than modifying --format
. I think it would be better to have the new options separate for compression formats and archive formats to limit the number of possible values.
e.g., --compression-format=gzip
and --archive-format=tar
.
I can't think of a scenario where this would break --format
:thinking:.
I can't think of a scenario where this would break
--format
🤔.
I think this will not be able to handle complex chains .tar.gz.xz.zst.gz.lz4.sz
.
Currently,
--format
takes aOsString
value.https://github.com/ouch-org/ouch/blob/4a323aeba83ad0f937bf5d2ed18eaa7a5afdb79d/src/cli/args.rs#L40-L42
Change this to the following:
I think this will allow
--format
to print possible values.The downside to this is that it makes complex chains of file formats such as
.tar.gz.xz.zst.gz.lz4.sz
impossible.