+2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning
+ of the whole pipe when indenting an opening keyword after a |.
+ Generalize this treatment to opening keywords like "while" (bug#18031).
+
2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (newline): Place the hook buffer-locally,
(and (numberp indent) (numberp initial)
(<= indent initial)))))
`(column . ,(+ initial sh-indentation)))
- (`(:before . ,(or `"(" `"{" `"["))
+ (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case"))
(if (not (smie-rule-prev-p "&&" "||" "|"))
(when (smie-rule-hanging-p)
(smie-rule-parent))
(unless (smie-rule-bolp)
- (smie-backward-sexp 'halfexp)
+ (while (equal "|" (nth 2 (smie-backward-sexp 'halfexp))))
`(column . ,(smie-indent-virtual)))))
;; FIXME: Maybe this handling of ;; should be made into
;; a smie-rule-terminator function that takes the substitute ";" as arg.
grep -v "^," | sort -t, -k2,2
}
+foo | bar | {
+ toto
+}
+
+grep -e "^$userregexp:" /etc/passwd | cut -d : -f 1 | while read user ; do
+ print -u2 "user=$user" # bug#18031
+ sudo -U $user -ll | while read line ; do
+ :
+ done
+done
+
echo -n $(( 5 << 2 ))
# This should not be treated as a heredoc (bug#12770).
2