bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31609: 25.3; sh-mode is confused about bash extglobs in case pattern


From: Phil Sainty
Subject: bug#31609: 25.3; sh-mode is confused about bash extglobs in case patterns
Date: Mon, 28 May 2018 09:32:11 +1200
User-agent: Orcon Webmail

If a workaround helps you, these variants are correctly indented:

case $foo in
    (@(bar|quux)) : do things;;
    (@(bar|quux)) {
        : do things
    };;
esac


On 2018-05-28 04:44, Ville Skyttä wrote:
When using bash's extended globbing constructs such as @(...), +(...),
!(...), *(...) in case patterns, sh-mode gets confused and indentation
         no longer works properly.

For example:

case $foo in
    @(bar|quux))
                <-- TAB brings the cursor here
        <-- ...whereas I would have expected it to be here
[...]

The indentation continues to be off for the remainder of the file,
i.e. after the ;; and terminating `esac'.

This is a largish annoyance for me when working with bash-completion,
which currently uses these constructs quite a bit in case patterns, and
more is on the way.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]