curl / trurl

trurl is a command line tool for URL parsing and manipulation.
https://curl.se/trurl/
Other
3.1k stars 99 forks source link

support --option=[value] style of command line parsing? #294

Closed bagder closed 3 months ago

bagder commented 3 months ago

Many command line tools support long options with an = character to specify the argument instead of a space.

Should trurl support that way? Should it support either = or space ? I think personally we can opt to support both variants.

Examples

Just to give a look at how it appears. I think the set instructions get uglier.


trurl https://example.com --get={host}
trurl https://example.com --get {host}

trurl https://example.com --set=host=curl.se
trurl https://example.com --set host=curl.se
jacobmealey commented 3 months ago

I agree that it makes --set look uglier. It could also make --url=curl.se and --url-file=path/to/file.txt a little nicer looking. It might also make using trurl in scripts a little easier.