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

Re: "here" document broken? (New findings)



    Hi Ronald :)

 * Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx> dixit:
> The following script, call it zsh_here, works well:
> 
> #!/bin/zsh -f
> cat << EOD
>   xxx
> EOD 
> 
> If I change it like this, it does not work anymore:
> 
> #!/bin/zsh
> cat << EOD
>   xxx
> EOD
> 
> If I execute it, I get the error message 
> 
>    zsh_here:2: no such file or directory

    Try this:

    #!/bin/zsh
    cat << EOD
    EOD

    If you still get the error, then the problem is in the "cat" line
(which I assume from the error output and line number) and in some
interaction with RC files.
 
> (1) If in the "good" version (version 1), I explicitly source .zshenv
> and .zshrc, it still works.

    Then the problem is probably not on those files but on /etc/zsh*
ones.
 
> I start to suspect that this zsh version (4.0.7) is broken. Unless
> someone has another idea where to look, I try to persuade our
> sysadmin to install a newer version (I know this won't be easy...).

    First let's take a look at the /etc/zsh* files. If you source
them explictly in your first example, does it still work?

    Can you install a new version of zsh locally (in your home) and
run it to reproduce the error?

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...



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