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

Pixi fish completion breaks fish-native completion #1906

Open
2 tasks done
jonashaag opened this issue Aug 25, 2024 · 6 comments
Open
2 tasks done

Pixi fish completion breaks fish-native completion #1906

jonashaag opened this issue Aug 25, 2024 · 6 comments
Labels
🐞 bug Something isn't working

Comments

@jonashaag
Copy link

jonashaag commented Aug 25, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Type

pixi run python <TAB>

Options offered by fish (my Pixi tasks):

pixi run python
bench              test         lint     ...

Issue description

Since a recent release of Pixi the completions for fish hinder fish from using proper completion for anything that's not a Pixi task. This includes the lack of filename completion, see example above. Completions offer only Pixi tasks even in places where it doesn't make sense (see example above).

Expected behavior

Should allow filename completion and task name completion only in places where a task is expected.

@jonashaag jonashaag added the 🐞 bug Something isn't working label Aug 25, 2024
@tdejager
Copy link
Contributor

Yeah you are right, this has recently changed. But how do you want the completion to function? Because python being completed was more of a side-effect, probably because it was on your global path?

@ruben-arts
Copy link
Contributor

The problem is that the auto-completion always completes the tasks, even if there is already a task.

@jonashaag
Copy link
Author

jonashaag commented Aug 26, 2024

Also, I always want pixi run py<TAB> to complete python

Edit: although I understand the decision to only show tasks. But it would be nice to complete both tasks and binaries in the envs' PATHs.

How do other package managers do this?

@tdejager
Copy link
Contributor

The problem is that the auto-completion always completes the tasks, even if there is already a task.

Yeah, let me see if we can work around this later. Does this not do this for bash?

@ruben-arts
Copy link
Contributor

ruben-arts commented Aug 26, 2024

Does this not do this for bash?

It doesn't seem to behave the same:

pixi on  main [!⇡] is 📦 v0.28.1 via 🦀 v1.80.0 
❯ pixi run test
test              test-all          test-integration  test-schema

pixi on  main [!⇡] is 📦 v0.28.1 via 🦀 v1.80.0 
❯ pixi run test te
tests/ 

@ruben-arts
Copy link
Contributor

We should take a look at the auto-completion after the first completion. But we don't autocomplete more than just until there is an actual solution to dynamic completion in clap as the maintenance of these scripts is not fun. Writing completion scripts per shell is a major slowdown on the development effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants