summaryrefslogtreecommitdiff
path: root/test/indent
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-12-04 10:09:08 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2014-12-04 10:09:08 -0500
commite3c24b171bfff16fb808cb02d3fc5eaff017c1bc (patch)
tree36899d349d406a88d8f3d53a999dbe93ed1891c2 /test/indent
parentd9d383147219f8e6a90d4c177e1b454e19acfac9 (diff)
downloademacs-e3c24b171bfff16fb808cb02d3fc5eaff017c1bc.tar.gz
* lisp/progmodes/sh-script.el: Fix indentation rule of "| while".
Fixes: debbugs:18031 * lisp/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".
Diffstat (limited to 'test/indent')
-rwxr-xr-xtest/indent/shell.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/indent/shell.sh b/test/indent/shell.sh
index e3619057d6e..14f67744ff2 100755
--- a/test/indent/shell.sh
+++ b/test/indent/shell.sh
@@ -54,6 +54,17 @@ filter_3 () # bug#17842
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