zsh-syntax-highlighting
zsh-syntax-highlighting copied to clipboard
Question: have the driver sourced in zsh emulation?
In INSTALL.md, shall we change source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
to emulate zsh -c "source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
?
Compare the documentation of autoload
: https://github.com/zsh-users/zsh/blob/fd627a504fd2a84833b7edcf92dd1595fcf11df9/Doc/Zsh/builtins.yo#L217-L224
In particular, I think this might have negated #622.
The test harness' callsite should be updated too — either to use this construct, or to test invocation with unusual options (e.g., KSH_ARRAYS) in effect.
How can we set "sticky" emulation for all our functions?
In INSTALL.md, shall we change
source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
toemulate zsh -c "source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
?
Actually, it might be easier to add a layer of indirection:
% git rename zsh-syntax-highlighting.zsh driver.zsh
% print -r -- $'0=${(%):-%N}; emulate zsh -c \'source "${0:h}/driver.zsh" "$@"\'' > zsh-syntax-highlighting.zsh
% git add $_
This way, we won't spend the next 10 years telling people to add the emulate
to their dotfiles…
We'd still need to check whether emulate zsh -c 'source $foo'
DTRTs for us, though.
(The ${(%):-%N}
is taken from zsh-syntax-highlighting.zsh:39.)
Triage: Deferring until after redrawhook is merged to prevent annoying merge conflicts upon that merge.
Triage: Deferring until after redrawhook is merged to prevent annoying merge conflicts upon that merge.
Triage: Unblocked; milestoning 0.8.0, but will defer it if that release is ready before this is merged.