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

Make it possible to source the Zsh autocomplete script #1896

Merged
merged 3 commits into from May 1, 2024

Conversation

bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Apr 30, 2024

What type of PR is this?

  • bug
  • documentation

What this PR does / why we need it:

This PR updates the default Zsh autcompletion script so it can be sourced. This makes debugging/testing autocompletion easier, because there's no need to copy this file to zsh/site-functions dir and rename it.

I first described this problem in #1874

I also formatted this file with shfmt.

Which issue(s) this PR fixes:

Related to #1874.

I'm not sure if the same problem occurs in Bash. I'll check when I have more free time and possibly fix it in another PR.

Special notes for your reviewer:

None.

Testing

Tested locally.

I use this version of the zsh_autocomplete script in my own CLI programs, and it works as intended. Example: bartekpacia/emu.

Release Notes


@bartekpacia bartekpacia requested a review from a team as a code owner April 30, 2024 19:58
Copy link
Member

@meatballhat meatballhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heck yeah, shfmt! I would love to see some shfmt and shellcheck in CI at some point 🤩

Thank you, @bartekpacia 🤘🏼

@bartekpacia
Copy link
Member Author

bartekpacia commented Apr 30, 2024

Those are on my list :)

@meatballhat
Copy link
Member

@bartekpacia Please merge whenever you're ready 😁 And we've got auto-merge set up here, which you're welcome to turn on for any PRs.

@bartekpacia bartekpacia merged commit 955bc3e into urfave:main May 1, 2024
11 checks passed
@bartekpacia bartekpacia deleted the fix/autocomplete branch May 1, 2024 00:44
@bartekpacia bartekpacia restored the fix/autocomplete branch May 1, 2024 00:49
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.

None yet

2 participants