fix(completion): complete tasks after options in pixi run#6518
Open
hunger wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
I am not an expert in this part of the code, but this seemed like something claude would probably handle well. |
2 tasks
|
I was able to build and can confirm the cases listed in the issue now complete correctly. Thanks! While you at it is there much work to also improve the completion of pixi run -e <TAB> # completes incorrectly to the file list while it should suggest "test" env
pixi run -e t<TAB> # no completion suggested, should complete "test" |
Contributor
Author
|
Newest version has --environment as well as --platform covered in addition to your original report. |
0900cb7 to
a555f43
Compare
The bash completion for `pixi run` only suggested task names directly
after `run`. Preserve the clap-generated `case "${prev}"` block and run
task completion after it, so tasks are suggested at any position, e.g.
after `-e <env>` or `--frozen`. Also deduplicate task names that appear
in multiple environments.
Fixes prefix-dev#6494
…`pixi run` Bash, zsh, and fish completed the `-e`/`--environment` option value as file paths. Complete workspace environment names instead, mirroring the task completion. Add a hidden `--machine-readable` flag to `pixi workspace environment list` that the scripts call for the names. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…run` Bash, zsh, fish, and nushell completed the `-p`/`--platform` option value as file paths. Complete workspace platform names instead, mirroring the environment completion. Add a hidden `--machine-readable` flag to `pixi workspace platform list` that the scripts call for the names. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
wolfv
approved these changes
Jul 9, 2026
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.
The bash completion for
pixi runonly suggested task names directly afterrun. Preserve the clap-generatedcase "${prev}"block and run task completion after it, so tasks are suggested at any position, e.g. after-e <env>or--frozen. Also deduplicate task names that appear in multiple environments.Fixes #6494
How Has This Been Tested?
More tests:-)
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.