Skip to content

Handle zsh syntax #252

Open
Open
@gibfahn

Description

@gibfahn

I have a bunch of scripts (not least my dotfiles) where I have to deal with both bash and zsh. However whenever I add some zsh syntax, for example [[ -n "${foo[(r)b]}" ]] && echo 'b was found.' || echo 'b was not found.', the entire file becomes highlighted as an error.

I guess possible solutions are:

  1. Support zsh syntax
  2. Limit the error highlighting to just the affected line
  3. Recognise a magic comment to ignore issues for a particular line.

The first option sounds like a big rewrite, to the point where it's probably a different project (although supporting both would be really useful as scripts often mingle the two formats).

Unsure if the second and third options are feasible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgrammar bugIssues related to the bash grammar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions