-
Notifications
You must be signed in to change notification settings - Fork 2k
Improve the example carapace completer #14367
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for the submission! I haven't had a chance to try this yet, but I'd like to keep the The docs also include a separate example, IIRC, but the proper way to install the Carapace completer is to run its own If we do need improvements to the actual completer, then we'll need to submit those to the Carapace repo so that it can get generated with |
|
I'd love to see this particular example added to Cookbook - External Completers. Can you make that submission along with the explanation of its benefits? |
|
One final question (for now) - Any idea what the colors actually indicate for the |
I will when i have the time, probably later this week Is there anything more i'd have to do except write a a bit of docs and a pr?
Looks like that one does fix the issue with no completions when you haven't typed anything. But I think that we should probably upsteam the color sorting thingy.
No clue, i thought it looked ugly and zsh already seemed to do it. So i assumed there Also i think there should be some kind of mention of the fact that you can generate a config for carapace with "carapace _carapace nushell" in the docs. Maybe there is one but i cant seem find it. |
|
I'd like to see an entire carapace section of the cookbook. I think it's super powerful but it's pretty cludgy on how to get it setup. It would be great to have it perfected so that it was somehow a drop-in where people can download a carapace.nu and just use it in their config (or auto-source) to make it work. |
Thanks! No rush.
That's pretty much it.
I just wish I knew what it was :-)
There's not - And I agree there should be. And from @fdncred:
That's really our fault in the doc today. It's something I just haven't gotten around to fixing. With your let autoload_dir = ($nu.vendor-autoload-dirs | last)
mkdir $autoload_dir
cd $autoload_dir
carapace _carapace nushell | save -f carapace.nuFrom there, the user is free to modify the resulting file as desired, and that's really where the Cookbook section would come in handy. |
What I mean is to have a fully functioning carapace script that does everything and works. Not just the out-of-the-box stuff but combines all the examples from fish-completer, alias-completer, zoxide-completer, etc. That's what I'm talking about as a drop-in. It's what our cookbook tries to do but falls short, imo. |
Ah, got it. You mean the Putting It All Together? If so, in what ways does it fall short? Or do you really mean "carapace script"? ...
"carapace" script or "completer" script? Either seems possible, given that Carapace itself can also bridge to Fish, zoxide, etc. |
|
Yes, the putting it all together part. The fish completer isn't complete as it just says |
|
where are we at on this? |
Description
Currently the example completer doesn't return anything if you haven't typed anything. So it do do, for example "git ", you get nothing. Since carapace only gives completions when you pass a arg. By passing "" we get completions in this case too.
The output is also not sorted by color, so it looks something like this
Instead sort the output by color