* setopt returns both "interactive and login" @ 2006-06-26 17:29 Timothy Stone 2006-06-26 17:34 ` Peter Stephenson 0 siblings, 1 reply; 7+ messages in thread From: Timothy Stone @ 2006-06-26 17:29 UTC (permalink / raw) To: zsh-users Can my shell be both 'interactive' and 'login' at the same time? % set | grep -i version ... ZSH_VERSION=4.2.3 ... % uname -a Darwin colossus 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc ... otherwise known as Mac OS X Tiger (10.4.6) [tstone@colossus]~% setopt autocd extendedglob interactive login monitor shinstdin zle So... can my shell be both interactive and login. I'm not seeing anything in my /etc startup files that might be doing this. Maybe this is something unique to Mac OS X/Darwin builds, or invocations with the Terminal.app. Thanks, Tim ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 17:29 setopt returns both "interactive and login" Timothy Stone @ 2006-06-26 17:34 ` Peter Stephenson 2006-06-26 17:56 ` Timothy Stone 0 siblings, 1 reply; 7+ messages in thread From: Peter Stephenson @ 2006-06-26 17:34 UTC (permalink / raw) To: zsh-users Timothy Stone wrote: > Can my shell be both 'interactive' and 'login' at the same time? Yes, that's the normal case for a login shell. -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 17:34 ` Peter Stephenson @ 2006-06-26 17:56 ` Timothy Stone 2006-06-26 18:14 ` Michael Hernandez 2006-06-26 18:15 ` Peter Stephenson 0 siblings, 2 replies; 7+ messages in thread From: Timothy Stone @ 2006-06-26 17:56 UTC (permalink / raw) To: zsh-users; +Cc: Peter Stephenson On Jun 26, 2006, at 1:34 PM, Peter Stephenson wrote: > Timothy Stone wrote: >> Can my shell be both 'interactive' and 'login' at the same time? > > Yes, that's the normal case for a login shell. Hmmm... I'm beginning to understand something is occurring behind the scenes here... the *NIX /login/ utility. So, when I open a new terminal window, with /insert favorite terminal application here/, the /login/ utility is invoked and I get a *login* shell, this is *interactive*. Following that, I request a new shell at the command line, barring the /-l/ switch, I get a new, but / interactive/ shell: % ssh luser@box Password: [luser@box] ~% setopt ... interactive login ... [luser@box] ~% zsh [luser@box] ~% setopt ... interactive ... Am I on the right path here? Thanks, Tim ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 17:56 ` Timothy Stone @ 2006-06-26 18:14 ` Michael Hernandez 2006-06-26 18:45 ` Danek Duvall 2006-06-26 19:03 ` Timothy Stone 2006-06-26 18:15 ` Peter Stephenson 1 sibling, 2 replies; 7+ messages in thread From: Michael Hernandez @ 2006-06-26 18:14 UTC (permalink / raw) To: zsh-users On Jun 26, 2006, at 1:56 PM, Timothy Stone wrote: > > On Jun 26, 2006, at 1:34 PM, Peter Stephenson wrote: > >> Timothy Stone wrote: >>> Can my shell be both 'interactive' and 'login' at the same time? >> >> Yes, that's the normal case for a login shell. > > Hmmm... I'm beginning to understand something is occurring behind > the scenes here... the *NIX /login/ utility. > > So, when I open a new terminal window, with /insert favorite > terminal application here/, the /login/ utility is invoked and I > get a *login* shell, this is *interactive*. Following that, I > request a new shell at the command line, barring the /-l/ switch, I > get a new, but /interactive/ shell: > Am I on the right path here? If you are talking about a terminal window in X, you will (usually, YMMV) get an interactive shell always (because it's a shell waiting for your input at the terminal), but in order to have your terminal window use a login shell you need to specify that as such. For example Gnome-terminal or Konsole have check boxes in their settings you can tick to say you want the shell to be a login, or in xterm (also mrxvt, and some others) you can add -ls to the xterm command line to tell it you want a login shell. The difference between login and interactive shells is not as noticeable in zsh because of the way zsh handles startup files. Bash, for example, will only source .profile for login shells and .bashrc for all interactive shells (and both for shells that are both login and interactive), but zsh has a very complex (yet very convenient, depending on how you look at it) way of handling the startup files which can make the distinction between login and interactive shells blurry. One rule that you can keep in mind is that all login shells are going to be interactive but not all interactive shells are login shells (and again, the difference is not so important for zsh afaict). The "user friendly user guide" and the book "From Bash to Z Shell" both cover this, and are both very helpful (the Bash to Z Shell book especially, if you want to see comparisons between shells). Hope this helps! Mike ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 18:14 ` Michael Hernandez @ 2006-06-26 18:45 ` Danek Duvall 2006-06-26 19:03 ` Timothy Stone 1 sibling, 0 replies; 7+ messages in thread From: Danek Duvall @ 2006-06-26 18:45 UTC (permalink / raw) To: Michael Hernandez; +Cc: zsh-users On Mon, Jun 26, 2006 at 02:14:12PM -0400, Michael Hernandez wrote: > One rule that you can keep in mind is that all login shells are going to be > interactive but not all interactive shells are login shells (and again, the > difference is not so important for zsh afaict). Not *entirely* true, but generally so: "ssh -T <host>" will give you a login shell that isn't interactive. I don't think many people actually do crazy stuff like that, though. :) Danek ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 18:14 ` Michael Hernandez 2006-06-26 18:45 ` Danek Duvall @ 2006-06-26 19:03 ` Timothy Stone 1 sibling, 0 replies; 7+ messages in thread From: Timothy Stone @ 2006-06-26 19:03 UTC (permalink / raw) To: zsh-users On Jun 26, 2006, at 2:14 PM, Michael Hernandez wrote: > On Jun 26, 2006, at 1:56 PM, Timothy Stone wrote: > >> >> On Jun 26, 2006, at 1:34 PM, Peter Stephenson wrote: >> >>> Timothy Stone wrote: >>>> Can my shell be both 'interactive' and 'login' at the same time? >>> >>> Yes, that's the normal case for a login shell. >> >> Hmmm... I'm beginning to understand something is occurring behind >> the scenes here... the *NIX /login/ utility. >> >> So, when I open a new terminal window, with /insert favorite >> terminal application here/, the /login/ utility is invoked and I >> get a *login* shell, this is *interactive*. Following that, I >> request a new shell at the command line, barring the /-l/ switch, >> I get a new, but /interactive/ shell: >> Am I on the right path here? > > > The "user friendly user guide" and the book "From Bash to Z Shell" > both cover this, and are both very helpful (the Bash to Z Shell > book especially, if you want to see comparisons between shells). I have the latter, so I may have missed something in the text. I'll take a peek at the /User Friendly User Guide/ as a supplement. Peter, just saw your reply. Thanks. (No need to plug the book. Excellent material!) I'm just trying all of this out in a real world environment and syncing my mental expectations with the actual practice of it. Many thanks! Tim > > Hope this helps! > > Mike ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setopt returns both "interactive and login" 2006-06-26 17:56 ` Timothy Stone 2006-06-26 18:14 ` Michael Hernandez @ 2006-06-26 18:15 ` Peter Stephenson 1 sibling, 0 replies; 7+ messages in thread From: Peter Stephenson @ 2006-06-26 18:15 UTC (permalink / raw) To: zsh-users Timothy Stone wrote: > So, when I open a new terminal window, with /insert favorite terminal > application here/, the /login/ utility is invoked and I get a *login* > shell, this is *interactive*. Following that, I request a new shell > at the command line, barring the /-l/ switch, I get a new, but / > interactive/ shell: > > % ssh luser@box > Password: > [luser@box] ~% setopt > ... > interactive > login > ... > [luser@box] ~% zsh > [luser@box] ~% setopt > ... > interactive > ... > > Am I on the right path here? Yes, this too is standard behaviour. (Plug: It's described explicitly in "From Bash to Z Shell", chapter 5.) -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-06-26 19:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-06-26 17:29 setopt returns both "interactive and login" Timothy Stone 2006-06-26 17:34 ` Peter Stephenson 2006-06-26 17:56 ` Timothy Stone 2006-06-26 18:14 ` Michael Hernandez 2006-06-26 18:45 ` Danek Duvall 2006-06-26 19:03 ` Timothy Stone 2006-06-26 18:15 ` Peter Stephenson
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).