From: schaefer@z-code.com (Barton E. Schaefer)
To: zsh-users@math.gatech.edu
Subject: Re: maintaining init files on a [t]csh influenced system
Date: Wed, 6 Sep 1995 11:10:11 -0700 [thread overview]
Message-ID: <950906111012.ZM4206@zyrcon.z-code.com> (raw)
In-Reply-To: Toshi Isogai <toshi_isogai@maxtor.com> "Re: maintaining init files on a [t]csh influenced system" (Sep 6, 10:16am)
On Sep 6, 10:16am, Toshi Isogai wrote:
} Subject: Re: maintaining init files on a [t]csh influenced system
}
} On Wed, 6 Sep 1995, Andrew Eskilsson wrote:
}
} > Are there any possibilities to let zsh run the global [csh] files and
} > incorporate the freshly set variables into the shell?
}
} I am in the same situation and what I did was setting my login
} shell back to csh and at the end of my .cshrc (or .login) I added
}
} exec zsh
Yup, I do the same thing. Proper startup of the IRIX 4 desktop is pretty
heavily wired into having csh (or sh) as your login shell. My .cshrc on
IRIX 4 machines actually looks (in part) like this:
###
# Figure out if this login is from XDM on the console
setenv TTY "`tty`"
if ($?DISPLAY) then
if ($DISPLAY == :0) then
if (! $?CONSOLE_LOGIN) then
setenv CONSOLE_LOGIN "$TTY"
endif
endif
setenv WINTERM xterm
setenv XHOST `hostname`
endif
if ($?CONSOLE_LOGIN) then
if ("$CONSOLE_LOGIN" != "$TTY") then
unsetenv CONSOLE_LOGIN
endif
endif
# If this is not the XDM console and is interactive, run zsh
if (! $?CONSOLE_LOGIN && $?prompt) then
if (! $?SHLVL) then
exec /usr/local/bin/zsh -l
else
exec /usr/local/bin/zsh
endif
endif
###
On the original question, though -- there are two major syntactic barriers
to getting zsh to parse csh script files:
1. "set" commands, because they can do any of:
a. assign to multiple boolean options in a single command
b. mix assignments of option variables with string assignments
c. use spaces around the "=" sign in any string assignment
set noclobber history = 50 nonomatch prompt="`hostname`: "
2. the "$?variable" syntax for testing whether a variable is set
You can get zsh to parse just about everything else (*) by clever use of
aliases and zsh functions, but I haven't figured out a workaround for
either of the above.
(*) "switch" statements are VERY entertaining, but possible (I think);
anybody care to guess how?
--
Bart Schaefer Vice President, Technology, Z-Code Software
schaefer@z-code.com Division of NCD Software Corporation
http://www.well.com/www/barts
next prev parent reply other threads:[~1995-09-06 18:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-09-06 13:23 Andrew Eskilsson
1995-09-06 16:16 ` Toshi Isogai
[not found] ` <toshi_isogai@maxtor.com>
1995-09-06 18:10 ` Barton E. Schaefer [this message]
1995-09-06 18:15 ` Zefram
1995-09-06 18:33 ` Zefram
[not found] <28279.199509061833@stone.dcs.warwick.ac.uk>
1995-09-06 19:00 ` Barton E. Schaefer
1995-09-07 5:38 ` Dave Sainty
[not found] ` <z-code!Comp.VUW.AC.NZ!David.Sainty>
1995-09-07 8:17 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=950906111012.ZM4206@zyrcon.z-code.com \
--to=schaefer@z-code.com \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).