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

Re: [Fwd: Parameter Expansion questions]

"David R. Favor" wrote:
> Here's a larger fragment of the function I'm using, that is a wrapper
> around vi to check several directories for a file to edit. What is the
> recommended way to accomplish this in zsh, hopefully while retaining
> ksh compatibility also? I would like to get rid of the $shell_type
> nonsense and the ${=editpath} syntax in the loop.

If ksh compatibility is your main aim, the recommended way is to put

  [[ -n $ZSH_VERSION ]] && emulate ksh

at the top and write it in standard ksh.  This is supposed to remove all
your problems.  If it still doesn't work, then we want to know about it.
This sets all sorts of options you probably don't even want to know
about if you just want ksh compatibility.  (By the way, I think you had
option setting wrong back there somewhere:  it's `set -o OPTION' or
`setopt OPTION', not `export OPTION', which is why some of your attempts
didn't work.)

Peter Stephenson <pws@xxxxxx>       Tel: +39 50 844536
WWW:  http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy

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