From: "Nadav Har'El" <nyh@math.technion.ac.il>
To: Philippe Troin <phil@fifi.org>
Cc: alnesbit@optushome.com.au, zsh-users@sunsite.dk
Subject: Re: All login shells are interactive?
Date: Sun, 13 Oct 2002 23:48:40 +0200 [thread overview]
Message-ID: <20021013214840.GD22816@fermat.math.technion.ac.il> (raw)
In-Reply-To: <871y6u1ava.fsf@ceramic.fifi.org>
On Sun, Oct 13, 2002, Philippe Troin wrote about "Re: All login shells are interactive?":
> alnesbit@optushome.com.au writes:
> > That's what the FAQ says, but I don't understand how this can be true.
> > Surely you can have a non-interactive login shell, like, say
> >
> > zsh -l -c 'echo Non-interactive login shell'
>
> Yes indeed. And it is used by at least gnome-session and CDE when you
> start an X session.
Right. I even use this trick myself: my ~/.xsession file starts with a
#!/bin/zsh -l
line, so that it (and everything in it) gets run after zsh has read my
~/.zprofile, including all my enviroment variables (e.g., my PATH).
This is why when I wanted my .zprofile to print a welcome message only
for interactive login shells, I did something like this in .zprofile:
# We print this message only in a shell which is both interactive and a login
# shell. Alternatively we can move this message to zshrc, inside a test if $-
# contains l (i.e., a login shell).
case $- in
*i*)
print "*** $ZSH_NAME $ZSH_VERSION, $VENDOR $MACHTYPE"
print -P "Welcome to %m, %D{%A}, %D{%e %B %Y}, %t.";;
esac
--
Nadav Har'El | Sunday, Oct 13 2002, 8 Heshvan 5763
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Always remember you're unique, just like
http://nadav.harel.org.il |everyone else.
next prev parent reply other threads:[~2002-10-13 21:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 1:22 alnesbit
2002-10-13 17:56 ` Philippe Troin
2002-10-13 21:48 ` Nadav Har'El [this message]
2002-10-14 10:43 ` Peter Stephenson
2002-10-15 1:07 ` alnesbit
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=20021013214840.GD22816@fermat.math.technion.ac.il \
--to=nyh@math.technion.ac.il \
--cc=alnesbit@optushome.com.au \
--cc=phil@fifi.org \
--cc=zsh-users@sunsite.dk \
/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).