Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Reliable way to detect a login shell?



you can test options with -o

if [[ -o some_option ]] then
    whatever
fi

On Thu, Sep 23, 1999 at 02:09:15PM -0700, Clint Olsen wrote:
# Is there a way to tell (checking switches/arguments) that a particular
# shell is a login shell?  I'd like to be able to do this in my .zshenv to
# set some options.
# 
# For example:
# 
# if [ i'm a login shell ]; then
#   set -o ignoreeof
# fi
# 
# Thanks,
# 
# -Clint



Messages sorted by: Reverse Date, Date, Thread, Author