-
Notifications
You must be signed in to change notification settings - Fork 98
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
Enable check-status by default #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the name matters, it might be nicer to replace clap::Arg::with_name(flag)
by clap::Arg::with_name(&flag[2..])
. That way the arguments will be named check-status
and no-check-status
, nicely symmetrical.
Can you implement a strict compatibility mode?
this will be automatically enabled if the binary name is either http or https
src/cli.rs
Outdated
if matches!(bin_name, Some("http") | Some("https")) { | ||
cli.strict_compat_mode = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should also add an env for enabling strict_compat_mode
? This could be helpful for testing purposes and for users who have installed xh
via a package manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: I have now added XH_HTTPIE_COMPAT_MODE
env variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Option<bool>
is better than my idea about two fields 🙂
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
--check-status
by default if strict compatibility mode is not on.Resolves #144