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

Update ZSH completions #11120

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Conversation

David-Else
Copy link
Contributor

@David-Else David-Else commented Jul 10, 2024

  1. Add working directory
  2. Change some wording to make it follow feat: improve hx fish completion #10853 more closely
  3. Increase tail to +11 as this is where the actual languages start in the output from hx --health
  4. Filter ✘ and ✓ from the output

QUESTION: Why is #compdef _hx hx commented out? I have not un-commented it in case it is something to do with packaging I may not be aware of. It of course does not work until it is un-commented and will confuse people just trying to install the script themselves. Shall I un-comment it?

@the-mikedavis the-mikedavis added the A-packaging Area: Packaging and bundling label Jul 10, 2024
the-mikedavis
the-mikedavis previously approved these changes Jul 10, 2024
@the-mikedavis
Copy link
Member

I'm not sure why the compdef part is commented out either. Maybe it's removed automatically by brew? helix-editor/homebrew-helix#6

We could try uncommenting it and see if that breaks anything

@David-Else
Copy link
Contributor Author

We could try uncommenting it and see if that breaks anything

I have uncommented it, fingers crossed.

@archseer archseer merged commit 9d75385 into helix-editor:master Jul 11, 2024
6 checks passed
@branchvincent
Copy link
Contributor

Why is #compdef _hx hx commented out?

Sorry for the drive-by comment, but it was correct before. That's zsh's tag syntax for autoloaded completion files (i.e. those in $fpath, which is where brew and other packagers place them): https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Autoloaded-files

@David-Else
Copy link
Contributor Author

@branchvincent Thanks for this important info!

I am quite new to ZSH, when testing this PR I copied the file to /usr/share/zsh/vendor-completions/_hx on Debian, which is where all the other completions seem to live. I echo fpath and there it is: /usr/share/zsh/vendor-completions.

With the # it does not seem to work, even after logging in and out, and if I source /usr/share/zsh/vendor-completions/_hx it does not work either, BUT if I remove the # and source /usr/share/zsh/vendor-completions/_hx then it works. Perhaps you could shed some light on this? The permissions seem fine and other completions in this directory work:

image

I have made a PR to remove the # and can push it, but I would like to see it working on my system first if possible, cheers.

@David-Else David-Else deleted the zsh-completions branch July 11, 2024 11:19
@David-Else David-Else mentioned this pull request Jul 11, 2024
@David-Else
Copy link
Contributor Author

After some research and reading the docs I think the # definitely needs to be there, so I made a fix #11133

mxxntype pushed a commit to mxxntype/helix that referenced this pull request Aug 14, 2024
kyruzic pushed a commit to kyruzic/helix that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants