* sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Improve indentation within $(...). * test/indent/shell.sh: Add corresponding test.
This commit is contained in:
parent
09b2b8a5ce
commit
bd3f53dd2e
2 changed files with 8 additions and 1 deletions
|
@ -2115,7 +2115,11 @@ May return nil if the line should not be treated as continued."
|
|||
;; sh-indent-after-done: aligned completely differently.
|
||||
(`(:after . "in") (sh-var-value 'sh-indent-for-case-label))
|
||||
;; sh-indent-for-continuation: Line continuations are handled differently.
|
||||
(`(:after . ,(or `"(" `"{" `"[")) (sh-var-value 'sh-indent-after-open))
|
||||
(`(:after . ,(or `"(" `"{" `"["))
|
||||
(if (not (looking-at ".[ \t]*[^\n \t#]"))
|
||||
(sh-var-value 'sh-indent-after-open)
|
||||
(goto-char (1- (match-end 0)))
|
||||
`(column . ,(current-column))))
|
||||
;; sh-indent-after-function: we don't handle it differently.
|
||||
))
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
setlock -n /tmp/getmail.lock && echo getmail isn\'t running
|
||||
|
||||
toto=$(grep hello foo |
|
||||
wc)
|
||||
|
||||
# adsgsdg
|
||||
|
||||
if foo; then
|
||||
|
|
Loading…
Add table
Reference in a new issue