* Self-generating zsh script
@ 2006-10-27 17:28 Chris Johnson
0 siblings, 0 replies; only message in thread
From: Chris Johnson @ 2006-10-27 17:28 UTC (permalink / raw)
To: zsh-users
In case anyone's bored on this Friday (afternoon, here), I thought I'd
try writing one of those scripts whose output is itself in zsh. It
appears to be working:
------------------------
#!/usr/bin/env zsh
a='#!/usr/bin/env zsh\x0A\x0Aa=%s%s%s\x0A\x0Aprint -f $a \\\x27 $a \\\x27\x0A'
print -f $a \' $a \'
------------------------
The assignment line is not supposed to wrap.
Here's what I get when I compare the original script to the output of
the script, using the handy =() substitution.
$ diff self.zsh =(zsh self.zsh)
$ echo $?
0
--
Chris Johnson
cjohnson@cs.utk.edu
http://www.cs.utk.edu/~cjohnson
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-27 17:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 17:28 Self-generating zsh script Chris Johnson
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).