Skip to content

Improve zsh completions#864

Merged
natecook1000 merged 2 commits intoapple:mainfrom
rgoldberg:improve-zsh-completions
Mar 20, 2026
Merged

Improve zsh completions#864
natecook1000 merged 2 commits intoapple:mainfrom
rgoldberg:improve-zsh-completions

Conversation

@rgoldberg
Copy link
Contributor

Fixed 2 issues in zsh completions. See the commit messages for the respective issues & fixes.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@rgoldberg rgoldberg force-pushed the improve-zsh-completions branch 2 times, most recently from bc53deb to 6fa5310 Compare March 19, 2026 16:12
…subcommand arguments, which prevents functions from being unnecessarily called multiple times.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Call the main completion function iff the function is being called, which avoids an unnecessary call, but calls when necessary to avoid requiring a second tab when the script is first loaded.

Otherwise, calls compdef for the function & command, which allows the script to be sourced instead of autoloaded.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
@rgoldberg rgoldberg force-pushed the improve-zsh-completions branch from 6fa5310 to 77427e4 Compare March 20, 2026 12:25
@natecook1000 natecook1000 merged commit 9b5a0e7 into apple:main Mar 20, 2026
69 of 70 checks passed
@rgoldberg rgoldberg deleted the improve-zsh-completions branch March 20, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants