delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <20000810185013.17100.qmail@web118.yahoomail.com> |
Date: | Thu, 10 Aug 2000 11:50:13 -0700 (PDT) |
From: | Earnie Boyd <earnie_boyd AT yahoo DOT com> |
Subject: | Identifying the interactive shell and logon startup scripts |
To: | cygwin users <cygwin AT sourceware DOT cygnus DOT com> |
MIME-Version: | 1.0 |
Ok, I've done some preliminary work on this and posting for comments. 1) tcsh uses /etc/csh.login for it's login script as well as ~/.login and ~/.cshrc as well as some other possibilites based on ENV and DEFAULT_ENV. Logon processing can be started by `tcsh -l'. 2) ksh uses /etc/profile and ~/.profile for it's startup scripts. Logon processing can be started by `ksh -l'. 3) bash uses /etc/profile and [~/.bash_profile or ~/.profile] for it's startup scripts. Logon processing can be started by 'bash --login'. 4) a/sh - based on the strings in the executable would use /etc/profile and ~/.profile but I can't figure out how to do the logon processing. 5) zsh will use a various number of files depending on what the name of the file is used to start the process. It tries to emulate sh, ksh and csh as well as it's own variation. For the sake of this document will assume that the name of zsh is zsh and will process /etc/zprofile and ~/.zprofile upon logon which can be had by `zsh -l'. As one can tell it should be easy enough to properly set such things that are shell dependent such as the prompt string by having the appropriate files in place. So for bash's PS1 variable it should be set in ~/.bash_profile and the ~/.bashrc file should source ~/.bash_profile, for tcsh the prompt variable should be set in the ~/.cshrc file, etc. If you need to know what shell is running the following should suffice: THISSHELL=`set | grep -i version | cut -c1-4 | tr 'A-Z' 'a-z'` if [ -z $THISSHELL]; then THISSHELL=ash_; fi Cheers, ===== --- Earnie Boyd: <mailto:earnie_boyd AT yahoo DOT com> __Cygwin: POSIX on Windows__ Cygwin Newbies: <http://gw32.freeyellow.com/> __Minimalist GNU for Windows__ Mingw32 List: <http://www.egroups.com/group/mingw32/> Mingw Home: <http://www.mingw.org/> __________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |