all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Bruno Raoult <braoult@gmail.com>
Cc: 40076@debbugs.gnu.org
Subject: bug#40076: 26.3; [shell script mode/bash] Wrong indentation for extended pattern "case" switches
Date: Sun, 23 Aug 2020 08:34:14 -0400	[thread overview]
Message-ID: <CADwFkmk1Gkt-VkuPw7N3NSn1hAropO-Rs_+moWw0y7t0UYEyog@mail.gmail.com> (raw)
In-Reply-To: <87zhci3rr5.fsf@lorien.raoult.com> (Bruno Raoult's message of "Sun, 15 Mar 2020 10:13:34 +0100")

severity 40076 minor
found 40076 28.0.50
tags 40076 + confirmed
thanks

Bruno Raoult <braoult@gmail.com> writes:

> I have an issue with indentation of "case" switches containing extended patterns
> such as +(pattern-list). Same occurs with "emacs -Q".
>
> Below if an example of indentation I get:
> ========================================
> #!/bin/bash
> shopt -s extglob
>
> case $1 in
>     A)
>         echo indent OK. case 'A'
>         ;;
>     [a-z])
>         echo indent OK. Case '[a-z]'
>         ;;
>     +([1-9]))
>              echo indent NOK. Case '+([1-9])', extended pattern.
>              ;;
>              *)
>                  echo still NOK. Case '*', after extended pattern
>                  ;;
>              esac # still NOK
> ========================================

I can reproduce this on current master starting from "emacs -Q".

Best regards,
Stefan Kangas





      reply	other threads:[~2020-08-23 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15  9:13 bug#40076: 26.3; [shell script mode/bash] Wrong indentation for extended pattern "case" switches Bruno Raoult
2020-08-23 12:34 ` Stefan Kangas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmk1Gkt-VkuPw7N3NSn1hAropO-Rs_+moWw0y7t0UYEyog@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=40076@debbugs.gnu.org \
    --cc=braoult@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.