about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-11-05 00:30:42 +0100
committerOliver Kiddle <opk@zsh.org>2016-11-05 00:31:01 +0100
commit5c28031ea6f0095aa80afa56c3264c6cc5f36fbb (patch)
tree46849487bb2aee2ba62e98d08e7019d3c13ceda4 /Src/builtin.c
parent4b41e33cbcf8027b53ecae4467dc9232becb0420 (diff)
downloadzsh-5c28031ea6f0095aa80afa56c3264c6cc5f36fbb.tar.gz
zsh-5c28031ea6f0095aa80afa56c3264c6cc5f36fbb.tar.xz
zsh-5c28031ea6f0095aa80afa56c3264c6cc5f36fbb.zip
39834: when print used with -v and -l, include a final newline
Also complete print -S option and make further use of the
new printf to an array feature in other completion functions.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 083a3aeb3..b7b7bdf18 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4621,7 +4621,8 @@ bin_print(char *name, char **args, Options ops, int func)
 			  OPT_ISSET(ops,'N') ? '\0' : ' ', fout);
 	    }
 	}
-	if (!(OPT_ISSET(ops,'n') || OPT_ISSET(ops, 'v') || nnl))
+	if (!(OPT_ISSET(ops,'n') || nnl ||
+	    (OPT_ISSET(ops, 'v') && !OPT_ISSET(ops, 'l'))))
 	    fputc(OPT_ISSET(ops,'N') ? '\0' : '\n', fout);
 	if (IS_MSTREAM(fout) && (rcount = READ_MSTREAM(buf,fout)) == -1)
 	    ret = 1;