mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 04:30:27 +01:00
add printf builtin (15851, 15948)
This commit is contained in:
parent
aac666130c
commit
a5890553e8
3 changed files with 197 additions and 0 deletions
|
|
@ -716,6 +716,24 @@ ifnzman(noderef(Prompt Expansion))\
|
|||
)
|
||||
enditem()
|
||||
)
|
||||
findex(printf)
|
||||
item(tt(printf) var(format) [ var(arg) ... ])(
|
||||
Print the arguments according to the format specification. Formatting
|
||||
rules are the same as used in C. The same escape sequences as for tt(echo)
|
||||
are recognised in the format. All C format specifications ending in one of
|
||||
csdiouxXeEfgG are handled. In addition to this, `tt(%b)' can be used
|
||||
instead of `tt(%s)' to cause escape sequences in the argument to be
|
||||
recognised and `tt(%q)' can be used to quote the argument in such a way
|
||||
that allows it to be reused as shell input. With the numeric format
|
||||
specifiers, if the corresponding argument starts with a quote character,
|
||||
the numeric value of the following character is used as the number to
|
||||
print.
|
||||
|
||||
If arguments remain unused after formatting, the format string is reused
|
||||
until all arguments have been consumed. If more arguments are required by
|
||||
the format than have been specified, the behaviour is as if zero or an
|
||||
empty string had been specified as the argument.
|
||||
)
|
||||
findex(pushd)
|
||||
pindex(PUSHD_TO_HOME, use of)
|
||||
pindex(PUSHD_MINUS, use of)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue