emacs-devel
[Top][All Lists]
Advanced

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

Issue with bash new syntax.


From: Ergus
Subject: Issue with bash new syntax.
Date: Tue, 26 Jan 2021 15:17:06 +0100

Hi:

I am observing some issues with the indentation of the modern for loop
syntax in bash:

for ((it=0; it<${limit}; ++it)) {
                echo "whatever $it"
        }


The question-issue comes in two parts.

Question: How can I configure to remove the extra indentation before `{`?
  In cc-mode there is a procedure, a bit cumbersome, but working. But
  sh-mode does not have such a thing.

Issue:
  When this loop is nested inside an if or another for loop the
  closing indentation seems to be broken

for dim in ${dims[@]}; do
        for bs in ${blocksizes[@]}; do
                if [ something ]; then
for ((it=0; it<${ARGS[R]}; ++it)) {
                                        whatever...
                                }
-->                             else
                                        somethingelse
-->                     fi
-->                     done
-->                     done

Should I report a bug for this?


reply via email to

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