From 4b41e33cbcf8027b53ecae4467dc9232becb0420 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sat, 5 Nov 2016 00:27:47 +0100 Subject: 39389: when printf -v is used with an array use separate elements each time the format is reused --- Test/B03print.ztst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Test/B03print.ztst') diff --git a/Test/B03print.ztst b/Test/B03print.ztst index a4431cbc8..6ee2a09c6 100644 --- a/Test/B03print.ztst +++ b/Test/B03print.ztst @@ -310,3 +310,9 @@ 0:print and printf into a variable >typeset -g foo='once more' >typeset -g foo=$'into\C-@the-breach\C-@-' + + typeset -a foo + print -f '%2$d %4s' -v foo one 1 two 2 three 3 + typeset -p foo +0:printf into an array variable +>typeset -a foo=( '1 one' '2 two' '3 three' ) -- cgit 1.4.1