[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22341: shell-script indents lines following "cmd &| while" wrong
From: |
Lars Ingebrigtsen |
Subject: |
bug#22341: shell-script indents lines following "cmd &| while" wrong |
Date: |
Thu, 12 May 2022 14:36:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Ian Kelling <ian@iankelling.org> writes:
> cmd and done should be indented the same:
>
> cmd |& asdf; while read line; do
> cmd
> done
>
> cmd 2>&1 | while read line; do
> cmd
> done
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
This is by design, if I skim the code correctly. In the first case, we
have two commands separated by a semicolon, so shell-script-mode will
use the semicolon as the base of the indentation.
In the second instance we have "one command", so it's indenting from the
start of the line.
So this seems to be working as designed, and I'm therefore closing this
bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#22341: shell-script indents lines following "cmd &| while" wrong,
Lars Ingebrigtsen <=