Skip to content

RFC: Highlight warnings (valid syntax that might not do what its author intended)? #691

Open
@danielshahaf

Description

@danielshahaf
Member

Consider:

% cd ~/src/zsh
% print -l Test/V<1-2>*

That command prints:

V01zmodload.ztst
V02zregexparse.ztst
V10private.ztst
V11db_gdbm.ztst
V12zparseopts.ztst
V13zformat.ztst

This behaviour is correct, but might not be what the user intended.

Would it be useful to highlight such things as warnings?

(To clarify, I'm only asking about the user-visible functionality. How to implement it is a different kettle of fish.)

Activity

danielshahaf

danielshahaf commented on Mar 15, 2020

@danielshahaf
MemberAuthor

Possible uses:

  • Empty commands: foo; ; (currently, unknown-token)
  • Semicolons in array assignments: foo=( bar ; baz ) (see 3ca93f8 (updated in 81267ca))
  • Numeric glob adjacent to something that might match a digit: Test/V<1-2>*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @danielshahaf

        Issue actions

          RFC: Highlight warnings (valid syntax that might not do what its author intended)? · Issue #691 · zsh-users/zsh-syntax-highlighting