* All login shells are interactive? @ 2002-10-14 1:22 alnesbit 2002-10-13 17:56 ` Philippe Troin 2002-10-14 10:43 ` Peter Stephenson 0 siblings, 2 replies; 5+ messages in thread From: alnesbit @ 2002-10-14 1:22 UTC (permalink / raw) To: zsh-users 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' Andrew. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: All login shells are interactive? 2002-10-14 1:22 All login shells are interactive? alnesbit @ 2002-10-13 17:56 ` Philippe Troin 2002-10-13 21:48 ` Nadav Har'El 2002-10-14 10:43 ` Peter Stephenson 1 sibling, 1 reply; 5+ messages in thread From: Philippe Troin @ 2002-10-13 17:56 UTC (permalink / raw) To: alnesbit; +Cc: zsh-users 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. Phil. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: All login shells are interactive? 2002-10-13 17:56 ` Philippe Troin @ 2002-10-13 21:48 ` Nadav Har'El 0 siblings, 0 replies; 5+ messages in thread From: Nadav Har'El @ 2002-10-13 21:48 UTC (permalink / raw) To: Philippe Troin; +Cc: alnesbit, zsh-users 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: All login shells are interactive? 2002-10-14 1:22 All login shells are interactive? alnesbit 2002-10-13 17:56 ` Philippe Troin @ 2002-10-14 10:43 ` Peter Stephenson 2002-10-15 1:07 ` alnesbit 1 sibling, 1 reply; 5+ messages in thread From: Peter Stephenson @ 2002-10-14 10:43 UTC (permalink / raw) To: Zsh users list alnesbit@optushome.com.au wrote: > 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' Indeed, % zsh -l -c '[[ -o interactive ]] && print I am interactive quote> [[ -o login ]] && print I am a login shell' I am a login shell and it sources /etc/zlogin and .zlogin, too. The manual never actually defines the term `login shell', but in practice it's tied to the option. -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ********************************************************************** ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: All login shells are interactive? 2002-10-14 10:43 ` Peter Stephenson @ 2002-10-15 1:07 ` alnesbit 0 siblings, 0 replies; 5+ messages in thread From: alnesbit @ 2002-10-15 1:07 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh users list Thanks to all for the confirmation of my hunch. I sent a bug-report to zsh-workers@sunsite.dk. Andrew ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-14 13:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-10-14 1:22 All login shells are interactive? alnesbit 2002-10-13 17:56 ` Philippe Troin 2002-10-13 21:48 ` Nadav Har'El 2002-10-14 10:43 ` Peter Stephenson 2002-10-15 1:07 ` alnesbit
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).