mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-28 15:01:21 +02:00
22968: fix metafication for print -z and print -s
This commit is contained in:
parent
ebc76673aa
commit
a519a6d15c
@ -1,3 +1,8 @@
|
||||
2006-11-05 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 22968: Src/builtins.c: print -z and print -s didn't cope
|
||||
with the fact that the arguments were unmetafied.
|
||||
|
||||
2006-11-03 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/10928: send all "jobs" output to stdout, not shout.
|
||||
|
@ -3454,6 +3454,14 @@ mod_export LinkList bufstack;
|
||||
else \
|
||||
count += fprintf(fout, spec, width, VAL);
|
||||
|
||||
/*
|
||||
* Because of the use of getkeystring() to interpret the arguments,
|
||||
* the elements of args spend a large part of the function unmetafied
|
||||
* with the lengths in len. This may have seemed a good idea once.
|
||||
* As we are stuck with this for now, we need to be very careful
|
||||
* deciding what state args is in.
|
||||
*/
|
||||
|
||||
/**/
|
||||
int
|
||||
bin_print(char *name, char **args, Options ops, int func)
|
||||
@ -3727,6 +3735,14 @@ bin_print(char *name, char **args, Options ops, int func)
|
||||
|
||||
/* normal output */
|
||||
if (!fmt) {
|
||||
if (OPT_ISSET(ops, 'z') || OPT_ISSET(ops, 's')) {
|
||||
/*
|
||||
* We don't want the arguments unmetafied after all.
|
||||
*/
|
||||
for (n = 0; n < argc; n++)
|
||||
metafy(args[n], len[n], META_NOALLOC);
|
||||
}
|
||||
|
||||
/* -z option -- push the arguments onto the editing buffer stack */
|
||||
if (OPT_ISSET(ops,'z')) {
|
||||
queue_signals();
|
||||
|
Loading…
Reference in New Issue
Block a user