mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-28 15:01:21 +02:00
23086: printf should handle octal escapes in the \0NNN form
This commit is contained in:
parent
f7476178bc
commit
cfbcd2dbe0
@ -1,3 +1,8 @@
|
||||
2007-01-04 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20386: Src/zsh.h, Test/B03print.ztst: printf should handle
|
||||
octal escapes in the '\0NNN' form.
|
||||
|
||||
2007-01-02 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 22817: Frank Terbeck: Completion/Debian/Command/_aptitude:
|
||||
|
@ -1955,7 +1955,8 @@ enum {
|
||||
enum {
|
||||
/*
|
||||
* Handle octal where the first digit is non-zero e.g. \3, \33, \333
|
||||
* \0333 etc. is always handled.
|
||||
* Otherwise \0333 etc. is handled, i.e. one of \0123 or \123 will
|
||||
* work, but not both.
|
||||
*/
|
||||
GETKEY_OCTAL_ESC = (1 << 0),
|
||||
/*
|
||||
@ -1990,7 +1991,7 @@ enum {
|
||||
/* echo builtin */
|
||||
#define GETKEYS_ECHO (GETKEY_BACKSLASH_C)
|
||||
/* printf format string */
|
||||
#define GETKEYS_PRINTF (GETKEY_OCTAL_ESC|GETKEY_BACKSLASH_C)
|
||||
#define GETKEYS_PRINTF (GETKEY_BACKSLASH_C)
|
||||
/* Full print without -e */
|
||||
#define GETKEYS_PRINT (GETKEY_OCTAL_ESC|GETKEY_BACKSLASH_C|GETKEY_EMACS)
|
||||
/* bindkey */
|
||||
|
@ -259,3 +259,7 @@
|
||||
printf $'%\0'
|
||||
1:explicit null after % in format specifier
|
||||
?(eval):printf:1: %: invalid directive
|
||||
|
||||
printf '%b\n' '\0123'
|
||||
0:printf handles \0... octal escapes in replacement text
|
||||
>S
|
||||
|
Loading…
Reference in New Issue
Block a user