Hmmm. So we can have it both ways -- the flow control of functions but it all vanishes when the script exits? I'll experiment with that.Functions are great, and I recommend using them - just use them _inside_ the script. For anything but the most trivial scripts I make the main body of the script a function, too, something like this:
#!/usr/bin/env zshmain() {main program code here}
That would limit their number considerably. Ok, goodbye functions ... I mean ... how do you say it? ... functions at the 'zero level' ... not within a script. Hearing the same thing from yourself and Roman seals the deal.Only define functions inside your interactive shell when they need to make changes that persist after they exit - like changing directories, or updating variable values, etc.