Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Identifying the interactive shell and logon startup scripts To: cygwin users MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: __Cygwin: POSIX on Windows__ Cygwin Newbies: __Minimalist GNU for Windows__ Mingw32 List: Mingw Home: __________________________________________________ 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