Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Perl replacement challenge
- X-seq: zsh-users 1120
- From: TGAPE! <tgape@xxxxxxxxxxxxx>
- To: ramos@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: Perl replacement challenge
- Date: Wed, 29 Oct 1997 20:20:44 +0000 (GMT)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <199710291709.LAA11607@xxxxxxxxxxxxxxxxxxxxxx> from "ramos@xxxxxxxxxxxxxxxxxxxx" at Oct 29, 97 11:09:44 am
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.
0=-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.)
Ed
Messages sorted by:
Reverse Date,
Date,
Thread,
Author