commit 9dea22f

wf  ·  2026-07-27 09:08:16 +0000 UTC
parent c8194d7
Don't falsely abort when a shell command ends in a suffix character
1 files changed,  +4, -1
M ed
M ed
+4, -1
 1@@ -296,7 +296,7 @@ getline() {
 2 	arg=$src
 3 	case "$cmd" in
 4 		# These commands can't have a suffix.
 5-		[eEfqQrw\!])
 6+		[eEfqQrw])
 7 		case "$arg" in *[lnp])
 8 			err "Unexpected command suffix"
 9 			return 1
10@@ -304,6 +304,9 @@ getline() {
11 		esac
12 		;;
13 
14+		# Abort silently on `!'.
15+		\!) case "$arg" in *[lnp]) ;; esac ;;
16+
17 		# Any other command can, so simply extract the
18 		# suffix.
19 		*)