Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Strange behavior creating functions



On Jan 31, 10:49am, Sven Wischnowsky wrote:
} Subject: Re: Strange behavior creating functions
}
} 
} Bart Schaefer wrote:
} 
} > I wanted to create a function with a unique name, so I tried this:
} > 
} > function foo$$ () { echo $0 }
} 
} Urgh. Names in function definitions should be expanded.

This seems like the sort of thing that should have a regression test in
the Test directory -- because otherwise no one will remember about it,
and it was pure accident that I found it at all.

I'm sure we can find other function definition tests to try.

--- /dev/null	Tue May  5 13:32:27 1998
+++ Test/09funcdef.ztst	Mon Jan 31 03:32:58 2000
@@ -0,0 +1,8 @@
+%test
+
+  function f$$ () {
+    print regress expansion of function names
+  }
+  f$$
+0:Regression test: `function f$$ () { ... }'
+>regress expansion of function names

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author