Please allow -r as short form for --release.
So that one could write: cargo build -r/cargo b -r, cargo run -r/cargo r -r, cargo b --examples -r etc.
(Also, it would make sense to introduce -e as short form for --example and -es as short form for --examples, and -t as short form for --target.)
You know what? The lack of short flags is one of my favorite things about cargo. Because in any program with short args, that's what people use (and therefore what people teach, and what people are taught), and I eventually forget what they all mean and I begin just copying them recklessly from previous invocations because it's easier than taking 10 seconds to grep for them all in the documentation in order to figure out which ones I no longer need.
-es
I sincerely hope you intend to run the example examples/s.rs with that flag. Long arguments beginning with a single hyphen are pure sacrilege.
Yea, then it should be --es but that's rare enough that it doesn't need a shortcut (hence in parens).
But -r for --release makes sense because it has to be typed quite often..
If the problem is --release is long to type I would suggest aliases and tab completion. If tab completion isn't working well enough let's fix that. If we should have more aliases out-the-box, let's discuss that. I don't use --release but I setup a while ago in my ~/.cargo/config:
[alias]
br = "build --release"
rr = "run --release"
But, to me, cargo build -r looks like it's going to do some kind of additional recursion in its building. So I don't think it's a good idea to add.
(And cargo build --es looks like it's going to build the code with... spanish translations or something)
@rfcbot close
While I think we should find ways to make cargo build --release and cargo run --release less painful, let's see if the team agrees that we don't want to add a -r flag to build and release.
Team member @dwijnand has proposed to close this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the review above. :bell:
psst @dwijnand, I wasn't able to add the final-comment-period label, please do so.
The final comment period, with a disposition to close, as per the review above, is now complete.
Most helpful comment
You know what? The lack of short flags is one of my favorite things about
cargo. Because in any program with short args, that's what people use (and therefore what people teach, and what people are taught), and I eventually forget what they all mean and I begin just copying them recklessly from previous invocations because it's easier than taking 10 seconds to grep for them all in the documentation in order to figure out which ones I no longer need.I sincerely hope you intend to run the example
examples/s.rswith that flag. Long arguments beginning with a single hyphen are pure sacrilege.