Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Perl replacement challenge
- X-seq: zsh-users 1119
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: ramos@xxxxxxxxxxxxxxxxxxxx, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: Perl replacement challenge
- Date: Wed, 29 Oct 1997 09:11:57 -0800
- In-reply-to: <199710291619.KAA11548@xxxxxxxxxxxxxxxxxxxxxx>
- References: <199710291619.KAA11548@xxxxxxxxxxxxxxxxxxxxxx>
On Oct 29, 10:19am, ramos@xxxxxxxxxxxxxxxxxxxx wrote:
} Subject: Perl replacement challenge
}
} I have a very simple and effective solution:
}
} # Use "kshdot some_ksh_script" instead of ". some_ksh_script"
}
} kshdot() { source =(ksh -c ". $* 1>&2; senv") }
First question: Have you tried
kshdot() {
emulate -R ksh
setopt localoptions
. $*
}
Second question: If zsh's ksh emulation isn't good enough, what about
kshdot() {
setopt localoptions allexport
source =(ksh -c ". $* 1>&2; export")
}
I'm assuming that ksh's "export" works much like zsh's; I don't have a
copy of ksh to try it.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author