* history expansion bug?
@ 2002-10-14 15:48 Roman Neuhauser
2002-10-14 15:54 ` Roman Neuhauser
0 siblings, 1 reply; 3+ messages in thread
From: Roman Neuhauser @ 2002-10-14 15:48 UTC (permalink / raw)
To: zsh users
roman@freepuppy ~/work 1002:0 > for d in build*; do (cd $d && cvs -q up); done
M local.std.mk
M mktable.php
roman@freepuppy ~/work 1003:0 > ^cd^echo $d && cd
roman@freepuppy ~/work 1003:0 > for d in build*; do (echo $d cdcd cd $d && cvs -q up); done
is this a PEBKAC I'm not seeing, or a zsh problem?
--
If you cc me or take the list(s) out completely I'll most likely
ignore your message.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: history expansion bug?
2002-10-14 15:48 history expansion bug? Roman Neuhauser
@ 2002-10-14 15:54 ` Roman Neuhauser
2002-10-14 18:34 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Roman Neuhauser @ 2002-10-14 15:54 UTC (permalink / raw)
To: zsh users
# neuhauser@bellavista.cz / 2002-10-14 17:48:10 +0200:
> roman@freepuppy ~/work 1002:0 > for d in build*; do (cd $d && cvs -q up); done
> M local.std.mk
> M mktable.php
> roman@freepuppy ~/work 1003:0 > ^cd^echo $d && cd
> roman@freepuppy ~/work 1003:0 > for d in build*; do (echo $d cdcd cd $d && cvs -q up); done
>
> is this a PEBKAC I'm not seeing, or a zsh problem?
aha. those ampersands substitute the pattern. i'm now looking for a
way to disable it: backslashing them doesn't seem to have any
effect.
sorry for the noise.
--
If you cc me or take the list(s) out completely I'll most likely
ignore your message.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: history expansion bug?
2002-10-14 15:54 ` Roman Neuhauser
@ 2002-10-14 18:34 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2002-10-14 18:34 UTC (permalink / raw)
To: Roman Neuhauser, zsh users
On Oct 14, 5:54pm, Roman Neuhauser wrote:
} Subject: Re: history expansion bug?
}
} aha. those ampersands substitute the pattern. i'm now looking for a
} way to disable it: backslashing them doesn't seem to have any
} effect.
Double the backslashes:
schaefer[524] echo foo
foo
schaefer[525] ^echo^print foo \\&\\& bar
print foo && bar foo
foo
zsh: command not found: bar
This is a bug, sort of ... ^x^y is rewritten as !!:s^x^y and re-evaluated,
which causes an extra level of history-backslashes to be stripped.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-14 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14 15:48 history expansion bug? Roman Neuhauser
2002-10-14 15:54 ` Roman Neuhauser
2002-10-14 18:34 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).