-
Notifications
You must be signed in to change notification settings - Fork 739
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
Move uvx shell completion to uvx --generate-shell-completion #7511
Merged
Conversation
This file contains 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
Because a problem was found with Powershell and combining the generated completion scripts for uv and uvx, let's try separating uv and uvx command completion scripts.
Link to the powershell generator template - https://docs.rs/clap_complete/4.5.28/src/clap_complete/aot/shells/powershell.rs.html#28 - IMO we should not try to patch the output of the generator, but it seems to be possible, feel free to go that route if you want to. |
bluss
force-pushed
the
uvx-complete
branch
5 times, most recently
from
September 18, 2024 17:55
5198786
to
5c69652
Compare
Cc @ilyagr if you are interested |
Why am I hitting this? 🤔
|
Oh I think I had to build |
charliermarsh
approved these changes
Sep 20, 2024
Thanks for following up. |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Sep 23, 2024
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.4.13` -> `0.4.15` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.4.15`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0415) [Compare Source](astral-sh/uv@0.4.14...0.4.15) ##### Bug fixes - Revert "Treat invalid platform as more compatible than invalid Python ([#​7556](astral-sh/uv#7556))" ([#​7608](astral-sh/uv#7608)) ##### Documentation - Add the execution policy to powershell installs for single versions ([#​7602](astral-sh/uv#7602)) ### [`v0.4.14`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0414) [Compare Source](astral-sh/uv@0.4.13...0.4.14) ##### Breaking - Move uvx shell completion to `uvx --generate-shell-completion` ([#​7511](astral-sh/uv#7511)) ##### Enhancements - Adjust messaging for frozen hint on resolution failure during `uv add` ([#​7597](astral-sh/uv#7597)) - Provide resolution hints in case of possible local name conflicts ([#​7505](astral-sh/uv#7505)) - Improve Docker image release tagging order and display on `ghcr.io` ([#​7568](astral-sh/uv#7568)) - Improve deserialization error messages ([#​7598](astral-sh/uv#7598)) ##### Bug fixes - Allow system environments during project environment validity check ([#​7585](astral-sh/uv#7585)) - Avoid validating workspace members when `--no-sources` is provided ([#​7599](astral-sh/uv#7599)) - Fix handling of `sys.base_prefix` collision in interpreter identity check during tool installs ([#​7596](astral-sh/uv#7596)) - Make `uv cache prune` robust to unreadable rkyv entries ([#​7561](astral-sh/uv#7561)) - Revert "Remove duplicate warning for settings discovery errors ([#​7384](astral-sh/uv#7384))" ([#​7594](astral-sh/uv#7594)) ##### Documentation - Fix `-` to `_` in packaged applications document ([#​7571](astral-sh/uv#7571)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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.
Summary
Because a problem was found with Powershell and combining the generated completion scripts for uv and uvx, let's try separating uv and uvx command completion scripts.
The generated powershell script template can be seen in clap_complete source, and it starts with
using
directives, which makes it impossible (apparently) to concatenate two of those script outputs.As a side effect, this is available under
uv tool run --generate-shell-completion
too.Fixes #7482
Test Plan
eval "$(cargo run --bin uvx -- --generate-shell-completion bash)"