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

Question: have the driver sourced in zsh emulation? #688

Open
danielshahaf opened this issue Mar 13, 2020 · 5 comments
Open

Question: have the driver sourced in zsh emulation? #688

danielshahaf opened this issue Mar 13, 2020 · 5 comments

Comments

@danielshahaf
Copy link
Member

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.

@danielshahaf
Copy link
Member Author

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.

@danielshahaf
Copy link
Member Author

How can we set "sticky" emulation for all our functions?

danielshahaf pushed a commit that referenced this issue Mar 13, 2020
The «emulate» call isn't sufficient, since these lines are parsed before
it takes effect.

Fixes #689 (née #622).

See also #688 for preventing these gymnastics from being needed in the
first place.

See also junegunn/fzf#1924 for an inter-plugin
interaction that this probably fixes.
@danielshahaf
Copy link
Member Author

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"?

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.)

@danielshahaf
Copy link
Member Author

Triage: Deferring until after redrawhook is merged to prevent annoying merge conflicts upon that merge.

@danielshahaf danielshahaf removed this from the 0.8.0 milestone May 22, 2020
@danielshahaf danielshahaf added this to the 0.9.0 milestone Jul 14, 2020
danielshahaf added a commit that referenced this issue Aug 9, 2020
The parent commit, which merged the feature/redrawhook bug and thereby
closed PR #749, also fixed the following issue:

Fixes #40.

Fixes #90, closes #470. (The latter is a PR for the former.)

Fixes #150, closes #151, closes #160. (The latter two are PR's for the first one.) The related issue #183 appears to have been fixed in master. For #150, a different fix for older versions of zsh was considered but has not been implemented.

Issue #154 was fixed in xsel(1) in 2017. The parent commit probably fixed that issue for pre-2017 xsel(1).

Is #245, #356, and #749. Fixes #245 (redrawhook umbrella issue).

Does not reintroduce #257 (comment).

Does not reintroduce #259 (comment)

Closes #281 as obsolete.

Fixes #295.

Fixes #324.

Fixes #375.

Fixes #377.

Closes #421 as obsolete.

Fixes #520.

Unblocks #536 (already milestoned).

Fixes #632.

Unblocks #635. Milestoned.

Unblocks #688. Milestoned.

Unblocks administrative issue #655 (already milestoned).

(The above is copied from
#749 (comment),
but repeated here for the sake of github's commit-to-issue linking magic.)
@danielshahaf
Copy link
Member Author

danielshahaf commented Aug 9, 2020

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.

@danielshahaf danielshahaf modified the milestones: 0.9.0, 0.8.0 Aug 9, 2020
@phy1729 phy1729 modified the milestones: 0.8.0, 0.8.1 Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants