On Thu, Oct 02, 2008 at 11:27:00AM -0400, Decklin Foster <[EMAIL PROTECTED]> 
wrote:
> I've gotten a request from a user to deal with the tcsh/bash/zsh hack
> SHLVL:
> 
>   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500703

Hilarious. The proposed patch breaks the semantics of SHLVL, btw., so it
actually introduces a bug.

The corretc way to handle that is use a login shell, or set SHLVL to whatever
value one wants.

> As said there, I'm not in favor of this feature, but people want to use it

people == martin krafft, or is the set atcually large?

I think it's pretty silly to force every shell script to do something stupid
with some random env variable - either ALL shell scripts need fixing, or
none. The fact that urxvtcd is implemented via a shell script is not trhe
fault of urxvtcd, and if the behaviour of SHLVL in noniteractuve shells is
bad, then bash/dash etc. needs fixing, not urxvtcd.

If all they want is a fresh start, they should use a loginshell and can
set whatever env variable they want, or put it in teir .profile.

> loudly when they find themselves on another system). And then I have to
> explain why our /usr/bin/urxvtcd is different from the script suggested
> in the documentation.

I don't think it is important that the snippet in the docs matches the binary
on debian, so while I think overall it's stupid to patch all shell scripts
(it's just wrong), similarity to the faq wouldn't weigh much in my book.

> However, a general mechanism for having urxvt set environment variables
> before launching the shell/command (without resorting to -e env ...)
> might make everyone happy.

rxvt-unicode has supported that almost forever:

   var=value urxvt

> Is this desirable, or just more kludging?

It already exists, and works for all programs, not just urxvt: env variables
get inherited by child processes on unix :)

And surprise surprise, it works with other terminal emulators as well.

If you want to do it within the shell, then I don't see why a new mechanism
over .profile or env is needed: you cna laready do all this perfectly well
using standard mechanisms, introducing one more is not just bloat, it is also
confusing to users.

> I'd like to have a FAQ that says "you have to set this" but not "you have
> to write your own wrapper script".

I didn't understand that

> 
> -- 
> things change.
> [EMAIL PROTECTED]
> 
> _______________________________________________
> rxvt-unicode mailing list
> [email protected]
> http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [EMAIL PROTECTED]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to