~emersion/mrsh

ref: 07e65a3a88e03c6d9e6f1f6ac4a1cfa9a74a9b09 mrsh/test/return.sh -rw-r--r-- 305 bytes
07e65a3aSimon Ser parser/arithm: fix && and || 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh -e
func_a() {
	echo func a
	return
	echo func a post-return
}

func_b() {
	echo func b
	return 1
	echo func b post-return
}

func_c() {
	echo func c
	while :
	do
		echo func c loop
		return
		echo func c loop post-return
	done
	echo func c post loop
}

func_a

if func_b
then
	exit 1
fi

func_c