where to define variables for zsh with csh login shell

where to define variables for zsh with csh login shell

Post by Fei Che » Sun, 18 Feb 2001 20:50:23



Hi all,

I use zsh. Since the login shell is csh (sh as Sven Mascheck
recommends), I put an "exec zsh -l" statement in the .login

My question concerns with what's the recommended place to specify the env
variables such as $path Right now I have $path defined in .login, so
zsh inherits it. But there are other places where I could have put the
stuff in, such as .zshenv What's the best way?

In the .login file there are other stuff like checking which platform I'm
logining on, which window system, etc. I suppose this cannot be moved to
other places.

If .login decides I'm login using xdm, it sends me to .xsession .  Now
there's also a $path defined in that file. I use fvwm 1.24 and invoke zsh
with something like "rxvt -e csh -l" so probably all the variables defined
in .xsession do not apply, which is just fine. So I should leave .xsession
as bare minimum as possible, is that correct?

It would be nice to see how others set things up.

Thanks much everyone,

Fei

PS I notice that there's little discussion in this group on zsh (I wish
there's more...) Is it because zsh is not as popular as I imagine? Or
because stuff on ksh covers a lot of the same issues?

 
 
 

1. csh shell, problem with echoing variable variables...

    Just for starters, I would not be working in this csh if I didn't have to
but I do.... so here is my question:

Script:
#
set person=smith
set score_$person=90
echo $score_smith  #  this returns the value 90 as expected
echo score_$person #  this returns the variable name --> score_smith
------------------

     No matter what I try, quotes, brackets, () etc...  I can not make
the value of score_smith echo using the variable $person in the name. I
am not sure if it is even possible, does anyone know if it is?  An
E-mail would be fine.  

Thanks
Adam

(ps. This is just a basic example, in reality I wish to use the
     variable in a loop thus setting a variable for each person's
     score which I could use later in the script. ( I also need
     to use the person's name and not a numbered index ))
.

2. Using a.out

3. question about csh variables defined by "set"

4. sPPP, RAS, MD5, CHAP, ISDN, FreeBSD and WinNT

5. how do I define variables in csh?

6. Changing Flow Control on COM2

7. Make remote-shell csh act as login-shell

8. chat causing dial up problems

9. Seeking example shell syntax for bash, csh, zsh, sh

10. How do I detect which shell (ksh, bash, csh, zsh, tcsh) is currently used?

11. Null defined variable in Bourne shell

12. Expanding a shell variable that may contain shell variables.

13. who to make a variable read only in csh shell