fix(complete): Strip wrappers for running completer#5733
Merged
epage merged 2 commits intoclap-rs:masterfrom Sep 17, 2024
Merged
fix(complete): Strip wrappers for running completer#5733epage merged 2 commits intoclap-rs:masterfrom
epage merged 2 commits intoclap-rs:masterfrom
Conversation
epage
added a commit
to epage/cargo
that referenced
this pull request
Sep 17, 2024
This pulls in - clap-rs/clap#5731 for `IFS` oddities I had - clap-rs/clap#5733 with the hope that this makes `CARGO_COMPLETE_BASH cargo +nightly` just work `clap` was completed next to `clap_complete` because `clap_complete` depends on unstable features from `clap`. None should have changed in this time window but I wanted to exercise caution.
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Sep 18, 2024
fix(complete): Fix problems on my machine ### What does this PR try to resolve? This pulls in - clap-rs/clap#5731 for `IFS` oddities I had - clap-rs/clap#5733 with the hope that this makes `CARGO_COMPLETE_BASH cargo +nightly` just work ### How should we test and review this PR? ### Additional information `clap` was completed next to `clap_complete` because `clap_complete` depends on unstable features from `clap`. None should have changed in this time window but I wanted to exercise caution.
epage
added a commit
to epage/cargo
that referenced
this pull request
Sep 18, 2024
clap-rs/clap#5733 removed the rustup proxy so that `CARGO_COMPLETE=bash cargo +nightly` works (with a side benefit of removing the proxy overhead). As a downside, cargo no longer knows it is running within rustup, so we aren't reading `--target` candidates from rustup. This changes the code to always try rustup. It is likely a good enough source, even if the user isn't currently using it. The candidates should be about the same, just rustup hides some by default. Hiding just means it isn't shown by default but if only hidden candidates match, then we show them.
epage
added a commit
to epage/cargo
that referenced
this pull request
Sep 19, 2024
clap-rs/clap#5733 removed the rustup proxy so that `CARGO_COMPLETE=bash cargo +nightly` works (with a side benefit of removing the proxy overhead). As a downside, cargo no longer knows it is running within rustup, so we aren't reading `--target` candidates from rustup. This changes the code to always try rustup. It is likely a good enough source, even if the user isn't currently using it. The candidates should be about the same, just rustup hides some by default. Hiding just means it isn't shown by default but if only hidden candidates match, then we show them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My hope is this will make the
source <(CARGO_COMPLETE=bash cargo +nightly)case work while providing a workaround for anyone who this doesn't work for.