Subject: Re: zsh & lilypond
From: Jan Nieuwenhuizen <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 27 Apr 2004 12:29:18 +0200

Peter A. Castro writes:

> That's not a "posix problem", it's an option.

Great, failure is an option.  Now that's a refreshing concept ;-)

> I can build bash stripped down and it won't have half the "required"
> posix features.

I'm sure you're right

> And, as I've already said, zsh can be configured for posix
> compliance.

and I'm sure you can.  So, pompted by your assertions

> > > believe this has been working for quite a while now

> that recent versions don't seem to exhbit this condition by default
> and that anyone experiencing this should upgrade to a newer zsh

and only asking for 

> Oh, that's simple: remove the if test :)

I decided to look at this simple suggestion for a fix.  I disabled the
zsh check

     # for zsh: start removing here
    -if [ -n "$ZSH_NAME" ] ; then
    +if false && [ -n "$ZSH_NAME" ] ; then
         echo "You are running this script under zsh. Edit this script by hand. "

and, just trying to do you (and other ZSH users) a favour (sorry,
can't keep up the mean attitute, just haven't got it in me) tested
it using two different zsh versions on different systems.

Debian/unstable
    10:32:35 janneke@peder:~
    +zsh:8> zsh --version
    zsh 4.2.0 (i686-pc-linux-gnu)
    \[\e[7m\]\t\[\e[m\] \u@\h:\[\e[5m\]\w\[\e[m\]\n$ . ./buildscripts/out/lilypond-profile
    +zsh:3> . ./buildscripts/out/lilypond-profile
    +./buildscripts/out/lilypond-profile:15> false
    +./buildscripts/out/lilypond-profile:1> basename ./buildscripts/out/lilypond-profile
    +./buildscripts/out/lilypond-profile:22> [ lilypond-profile '=' lilypond-profile ']'
    +./buildscripts/out/lilypond-profile:23> cat

    Error: This script cannot be run in a subshell; it MUST be sourced.

FreeBSD 4.7
    +zsh:3> zsh --version
    zsh 4.0.7 (i386-unknown-freebsd4.7)

same thing.

This means that your suggestion breaks for Debian and FreeBSD users,
so I cannot install it.

> As most "user requests" go, they are very specific to their
> environment and usage and rarely take "the big picture" into
> account.  Perhaps you could have taken a more broad approach to
> solving it?

Yes, maybe I could have, but I don't feel like doing that.  I don't
think it's important enough and it looks like I've already consumed my
zsh hand-holding quota for this year.

Every time it saddens me to see the zsh community being so demanding,
yet so little helpful in taking care of or responsibility for their
own problems.

> Or is that not sufficient incentive either?

No, it isn't.  Sorry.  I do not want zsh users to get logged out by
the profile script; the `flashing terminal' problem, because that's
not helpful.

But other than that, I'm all for letting people fix their own
problems.

> Why are you even testing for the name of the program?

LilyPond is still not bundled with all major distributions, and if it
is, it's often outdated.  That means that we get lots of `musicians'
to compile and install it.  One of the hardest concepts for
non-programmers seems to be the sourcing of the profile script.

> There are other, arguably better, ways of solving configuring of
> shell variables.

> Sorry, but I feel you might want to investigate taking a different
> approach to how your scripts operate.

I accept patches, but I would appreciate you do some thorough testing
yourself, next time.

> as far as I'm concerned this is now OT for Cygwin.

Right.  Flup to lilypond-devel.

Jan.

-- 
Jan Nieuwenhuizen <[email-masked]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/