GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix Zsh completions with colons by the-13th-letter · Pull Request #2846 · pallets/click Conversation
|
|
Thanks for taking the time to submit this PR. We will review this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Rebased onto and retargeted to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Apologies for the delay. This looks pretty good, but it's a bit hard to review. We'd ideally need some way to create tests for autocomplete. Does anyone know how we could possibly trigger autocomplete? If so, we might be able to use scrut to create a test for it. I think it should be fine with just a note in the changes and if that's done, we can merge this afaik. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
See previous comment, a nitpick and otherwise just CHANGES that needs an addition.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| """""" | ||
| # See issue #1812 and issue #2703 for further context. (TL;DR: | ||
| # colons sometimes need special handling.) | ||
| # | ||
| # Items *with* help are registered with zsh's `_describe`, which | ||
| # splits off the help/description after the first colon. So | ||
| # escape all colons in item.value so that they arrive intact. | ||
| # | ||
| # Items *without* help are registered with zsh's `compadd`, | ||
| # which does no colon handling. So do *not* escape colons in | ||
| # item.value, lest the completions themselves ultimately get | ||
| # mangled. | ||
| # | ||
| # Finally, there is no functional difference between using an | ||
| # empty help and using "_" as help. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Clean this up a tad perhaps? It'd be nice to have this explained in-line if possible.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Commentary rewritten in the current iteration of this PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Meant to click request changes, woopsie!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Rebased onto
Can't help you there, sorry. To test my submission, I did write a small < 50-line click application that completed filenames manually, sometimes adding help texts, sometimes even with colons, and then interactively tab-completed arguments in a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've rebased this on stable. Then I've removed the ZSH template check, I'm not sure why we're checking the output of the ZSH completion here. We only really care about the output, don't we? Let me know in case I missed something. Otherwise this seems good to land if CI is good. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Resolves pallets#2846. Co-authored-by: Andreas Backx <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
zsh completion still misbehaving in the presence of:
There was an error while loading. Please reload this page.