Skip to content

Conversation

phy1729
Copy link
Member

@phy1729 phy1729 commented Feb 11, 2018

Re #491, something like this? It does incorrectly highlight -n as path in a case statement like

case a in --) foo;; a) cat -n .zshrc;; esac

(Should be single-hyphen-option; is highlighted as path.)

@phy1729 phy1729 added this to the 0.7.0 milestone Oct 23, 2018
danielshahaf added a commit that referenced this pull request Nov 1, 2018
Copy link
Member

@danielshahaf danielshahaf left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this, and sorry for the very late review.

The test LGTM 👍. While reviewing the implementation found a minor issue which appears to be preëxisting, and filed it as #577.


# The Great Fork: is this a command word? Is this a non-command word?
if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#"$arg"} ]]; then
seen_dashdash=0
Copy link
Member

Choose a reason for hiding this comment

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

I think the variable may need to be reset to 0 in a few more cases: consider { cat -n -- -n } always { printf %s -n } and : > >(ls), both of which start a new simple command without using ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR tokens. That said, we seem not to get this correctly for other cases, either: raised that as #577.

Even more obscure: svnadmin freeze -- /path/to/foo/ ls -l. That -l is an option to ls, but in svnadmin the -- is required. Admittedly, most commands that execv() their positional arguments don't require a -- (for example, env -i /bin/ls -l), so maybe we should just accept this.

(For the curious, yes, that nests. svnadmin freeze -- foo/ svnadmin freeze -- bar/ ls -l is valid.)

@danielshahaf
Copy link
Member

@phy1729 This is milestoned 0.8.0. Do you intend to work on it for the 0.8.0 release? If yes, great; if not, could you re-milestone it appropriately? Cheers.

@danielshahaf
Copy link
Member

(Assigning until the question is answered. Feel free to unassign yourself if needed.)

@danielshahaf
Copy link
Member

Triage: Bumping to the next milestone due to feedback timeout.

@danielshahaf danielshahaf modified the milestones: 0.8.0, 0.9.0 May 22, 2020
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.

2 participants