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
Stop depending on zsh-syntax-highlighting implementation details #58
Comments
I should add: I'm the maintainer of z-sy-h, and I'd be happy to make changes on z-sy-h's side to make parts of it more reusable by other projects. Just open an issue and say what you want made reusable ☺. |
It's been a while but AFAIK that code was embedded here to make both plugins play well together. 💭 Could you expose a public API function that rebinds all ZLE widgets to invoke a user-specified function? 🎁 That way we can drop both |
Encapsulating the "Use However, I don't think such a library function being made available is a prerequisite for addressing my request, which was simply for z-h-s-s to stop defining functions called I realize that wouldn't solve the technical debt that duplicating the function definition introduced. However, it would be an improvement and a step in the right direction (it would prevent a class of bugs). To be fair, Cheers! |
Hi @danielshahaf, Thanks a lot for all your work on z-sy-h! Unfortunately I do not understand the details of the issues around zle-line-pre-redraw. However, would a simple |
Good morning, @guidovansteen.
It would solve one problem, but leave one other problem and one other edge-case problem unresolved. The problem it would solve is coexistence of z-h-s-s and z-sy-h under zsh≤5.2. The problem it leaves unresolved is the fact that z-h-s-s defines and invokes functions in the The edge-case problem is a known bug in So, in short: that perl pie would effect an improvement, but it wouldn't solve the issue I opened this ticket about.
Short summary: in zsh 5.3, one will be able to do Cheers, |
Thanks @danielshahaf. Would it help if we use something like "s/orig-/zssh-$RANDOM/"? |
I assume that'd solve the widgets issue but not the functions issue. |
People who want to use this plugin but don't want to enable zsh-syntax-highlighting can install this fork https://github.com/changyuheng/zsh-syntax-highlighting instead. This fork has all the functions of zsh-syntax-highlighting but not enabling it. The reason I don't want to enable zsh-syntax-highlighting is that it's performance is too bad. If you paste multiple lines of commands at once, your terminal would get stuck for a while which can be longer than 10 seconds. |
This zsh-history-substring-search plugin does not require zsh-syntax-highlighting! 👮♂️ It stands alone. 🥇 |
@sunaku Maybe I was wrong but I got this error when I disabled |
@sunaku It seems like since I had installed |
The reason I don't want to enable zsh-syntax-highlighting is that it's
performance is too bad. If you paste multiple lines of commands at
once, your terminal would get stuck for a while which can be longer
than 10 seconds.
You may want to set ZSH_HIGHLIGHT_MAXLENGTH=100 in your .zshrc. If you
see further issues with zsh-syntax-highlighting, please report them on
the z-sy-h issue tracker (or IRC). Thanks.
(I'm a z-sy-h maintainer)
|
@danielshahaf It works perfectly, thank you! |
Currently, this project defines the functions
_zsh_highlight
and_zsh_highlight_bind_widgets
if they are not already available.Those functions are private functions of zsh-syntax-highlighting, in its namespace, and z-sy-h reserves the right to change the semantics of those functions incompatibly without notice.
As a matter of good engineering, please stop depending on implementation details of z-sy-h.
zsh-history-substring-search/zsh-history-substring-search.zsh
Lines 89 to 176 in 557d25e
The text was updated successfully, but these errors were encountered: