mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
35412: fix for - flag when formating strings with printf
This commit is contained in:
parent
a253ada08b
commit
ac26fafa03
3 changed files with 12 additions and 3 deletions
|
@ -169,11 +169,15 @@
|
|||
0:%n count zeroed on format reuse
|
||||
>1
|
||||
|
||||
# this may fill spec string with '%0+- #*.*lld\0' - 13 characters
|
||||
printf '%1$0+- #-08.5dx\n' 123
|
||||
# this may fill spec string with '%0'+- #*.*lld\0' - 14 characters
|
||||
printf '%1$0'"'+- #-08.5dx\n" 123
|
||||
0:maximal length format specification
|
||||
>+00123 x
|
||||
|
||||
printf "x:%-20s:y\n" fubar
|
||||
0:left-justification of string
|
||||
>x:fubar :y
|
||||
|
||||
printf '%*smorning\n' -5 good
|
||||
0:negative width specified
|
||||
>good morning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue