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

Re: Perl replacement challenge

ramos@xxxxxxxxxxxxxxxxxxxx wrote:
>> ramos@xxxxxxxxxxxxxxxxxxxx wrote:
>>> 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") }
>>> Where 'senv' is the following Perl script:

8><= 8><=

>> But remember you can make emulate local to a function.  You might get
>> away with something like
>> kshdot() { emulate ksh; setopt localoptions; . $*; }
>> at least for some of the scripts.
> Yup, works for some scripts. But some of them go out of their way to
> try to make sure you're really running an honest ksh.


Does this help?  (Note: you still need emulate ksh, and you probably
will want to change it back, but it works for me in some cases.  It
doesn't make the emulation better, but it tends to circumnavigate their
tests to see if you're running ksh.)


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