-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
zsh autocomplete #608
zsh autocomplete #608
Conversation
PR Summary
|
Those errors are a little thorny. Looks like our zsh package might need: runtime:
env:
FPATH: ${{prefix}}/functions
MODULE_PATH: ${{prefix}}/lib/zsh/{{version.marketing}} or similar... |
I believe pkgxdev/pantry#2132 will fix this PR, if it's deemed an acceptable solution. |
why is this dependent on our zsh? zsh comes with mac. Yes, our zsh should work, and linux ofc. But we should be able to add this without fixing zsh and looking at my current schedule I will not be able to fix zsh for weeks. |
Probably because of how our tests work. I'll see if I can fix the test. Was trying to avoid removing a test that caught a real issue to push code through. |
pkgxdev/pantry#2132 should do it. |
64cf9a4
to
b918b9c
Compare
Confirmed, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it and it works!
$ py
pygmentize pyproject-build python
pylsp pytest python\{\{
python python\{\{\ version.major\ \}\}
python3 python\{\{\ version.marketing\ \}\}
needs some moustache expansion.
$ git cl
clang clear cluster
clang++ clippy-driver clusterdb
clean -- remove untracked files from working tree
clone -- clone repository into new directory
Seems we are completing any time TAB
is pressed.
|
||
if _has_tea_magic; then | ||
# Call \`tea --complete\` with the current word as the prefix | ||
completions=($(tea --complete \${words[CURRENT]})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even if we use sqlite having to use tea
will add 80ms to all completion which sucks
Can we have tea completions in teal? |
worth a try, certainly. |
Hm. Might just need to omit mustachioed variants. Otherwise, we'd need to do produce them for every version available...
That we should not do. Probably something I missed about detecting context. |
b918b9c
to
4314dc2
Compare
the docs for zsh completion are long but not amazing. |
colorizing the results eluded me. i believe everything else is addressed. |
was a nice to have, not required. good job trying tho |
So trying it out, being able to distinguish between what is on the system and what is not yet on the system is pretty important IMO. We either need coloration or to make the results appear completely separately to system results |
Zsh completion has a grouping system. I wasn't able to properly group output (complicated, like I said), but supposedly it can be done by tags, then print a header for each section. I go back and forth about the import. If the point is to be magical, then not showing the difference seems like the right way. If they cared about local vs tea installed, they wouldn't use magic, right? |
it's a good point. Let's just merge and see how it feels for a few weeks I guess. |
ChatGPT was helpful, but did a lot of hallucinating
This works. The places I think it might need love:
it wasn't in any way clear to me how to interleave our completions with zsh's defaults. possibly because we don't work like anything elseone possibility is to do the path scanning ourselves, so we can just do the whole completion stack. this will also take time, and want for caching.