Skip to content

zsh: support ;| case clause terminator #1293

Closed

Description

@LangLangBart

❌ Fails to parse for ;|

./shfmt --language-dialect zsh <<<'case x in
  a) echo a ;|
  b) echo b ;;
esac'
# <standard input>:2:14: `|` can only immediately follow a statement

✅ ;; and ;& work fine.

zsh docs

https://zsh.sourceforge.io/Doc/Release/Shell-Grammar.html#Complex-Commands

Activity

  1. added a commit that references this issue on May 3, 2026
    5ca0d0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址