Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Strange behavior creating functions
- X-seq: zsh-workers 9481
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Strange behavior creating functions
- Date: Sun, 30 Jan 2000 20:17:06 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I wanted to create a function with a unique name, so I tried this:
function foo$$ () { echo $0 }
This works as expected in 3.0.7, creating a function named foo31679 (or
whatever the PID is). Same for 3.1.6-dev-14.
However, in 3.1.6-dev-16 (the first "foo" is an autoloaded function I use
for testing):
zagzig[60] functions -m foo\*
foo () {
# undefined
builtin autoload -X
}
foo () {
echo $0
}
zagzig[61] zmodload parameter; print -l ${functions[(I)foo*]}
foo
foo$$
zagzig[62] foo$$
zsh: command not found: foo29406
zagzig[63] 'foo$$'
zsh: command not found: foo$$
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author