Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bagder opened this issue May 7, 2024 · 1 comment
Closed

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

bagder opened this issue May 7, 2024 · 1 comment
Assignees

Comments

@bagder
Copy link
Member

bagder commented May 7, 2024

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
Copy link
Contributor

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.

@bagder bagder self-assigned this May 13, 2024
bagder added a commit that referenced this issue May 13, 2024
- add test
- mention in manpage

Fixes #294
@bagder bagder closed this as completed in 4cc172c May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants