Skip to content
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

Autocompletion for -e #739

Closed
pavelzw opened this issue Jan 30, 2024 · 4 comments
Closed

Autocompletion for -e #739

pavelzw opened this issue Jan 30, 2024 · 4 comments
Labels
✨ enhancement Feature request

Comments

@pavelzw
Copy link
Contributor

pavelzw commented Jan 30, 2024

Problem description

It would be nice to have autocompletion for pixi install/list/... -e <TAB> which lists all available environments.

@ruben-arts
Copy link
Contributor

I which we had this to! This is currently a real pain in the *ss to build as clap doesn't support custom auto-completion code. Adding this to the backlog of the multi env work but as not planned for near future work.

@pavelzw
Copy link
Contributor Author

pavelzw commented Jan 31, 2024

IMO, this configuration ideally should yield the following auto completions

[project]
name = "polarify"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]

[dependencies]
python = ">=3.9"
pip = "*"
polars = ">=0.14.24,<0.21"

[feature.py39.dependencies]
python = "3.9.*"
[feature.py310.dependencies]
python = "3.10.*"
[feature.py311.dependencies]
python = "3.11.*"
[feature.py312.dependencies]
python = "3.12.*"

[feature.build.dependencies]
hatchling = "*"
[feature.build.tasks]
postinstall = "pip install --no-build-isolation --no-deps --disable-pip-version-check -e ."

[feature.test.dependencies]
pytest = "*"
pytest-md = "*"
pytest-emoji = "*"
hypothesis = "*"
[feature.test.tasks]
test = "pytest"

[environments]
py39 = ["py39", "test", "build"]
py310 = ["py310", "test", "build"]
py311 = ["py311", "test", "build"]
py312 = ["py312", "test", "build"]
pixi run -e <TAB>
py39
py310
py311
py312

pixi run <TAB>
build  # py39, py310, py311, py312
test  # py39, py310, py311, py312

@pavelzw
Copy link
Contributor Author

pavelzw commented Feb 5, 2024

In the use case described in #767 (comment) (task not defined globally but is still in the default env), the task should also show up in pixi run <TAB>.

@ruben-arts
Copy link
Contributor

Closing this for the same reason as: #778 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
No open projects
Development

No branches or pull requests

2 participants