-
Notifications
You must be signed in to change notification settings - Fork 161
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
feat: add pixi run completion for fish shell #1680
feat: add pixi run completion for fish shell #1680
Conversation
b9e37b7
to
95d012b
Compare
Hi! Thanks for the contribution, that would be a great addition, couple things need to be changed:
Should be close to (but not correct yet):
But that does not handle 2, and 6 though. For 6. chatgpt suggested something like: # Function to check if 'run' is the first subcommand
function __fish_pixi_run_first_subcommand
# Get the current command line input
set -l cmd (commandline -opc)
# Check if the command line is exactly 'pixi run' or starts with 'pixi run '
if string match -q "pixi run" -- $cmd
return 0
end
return 1
end For the
But that does not seem to work alas... EDIT:
|
Thanks @tdejager for the pointers! I did some changes:
Regarding Point 5:
Instead we could do something like Another thing is even without this pr we already have this issue: So having thought about that, do you think cases like Let me know what you think |
@dennis-wey yes this is great thanks! I don't want to block on 5., as its difficult to get right indeed and having the completion is just too nice t.b.h. Last request, what do you think adding the complete command for the alias |
86bc8d6
to
f4081d9
Compare
@tdejager actually I didn't know that that one exists :D I added a regex pattern that |
I'm also not sure why the tests are failing. COuld this be unrelated to my pr? |
f4081d9
to
10baccc
Compare
Not its because of the |
Updating with main branch to fix CI. |
Add one more line to the fish script for code completion to support listing tasks in
pixi run
.I didn't know how to add description information but as far as I saw for the other shells, it's not yet used there either.
Closes #1191