From 7fce9e2411b9e63d949ad519f1b6a36744d3df4c Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 28 Aug 2014 18:27:23 -0700 Subject: Trim trailing newline on cmdsubst when IFS='' When $IFS is empty, command substitution no longer splits on newlines. However we still want to trim off a single trailing newline, as most commands will emit a trailing newline and it makes it harder to work with their output. --- tests/read.out | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/read.out') diff --git a/tests/read.out b/tests/read.out index 6d90fc0e..1098045d 100644 --- a/tests/read.out +++ b/tests/read.out @@ -1,6 +1,15 @@ 2 2 1 +[one +two] +1 +[one +two] +1 +[one +two +] 1 'hello' 1 'there' 1 'hello there' -- cgit v1.2.3