zsh-users
 help / color / mirror / code / Atom feed
From: Michael Hernandez <sequethin@gmail.com>
To: zsh-users@sunsite.dk
Subject: Re: setopt returns both "interactive and login"
Date: Mon, 26 Jun 2006 14:14:12 -0400	[thread overview]
Message-ID: <3EBBCB06-AA3E-44B0-9F18-189D3A8BAE7B@gmail.com> (raw)
In-Reply-To: <5FC432DB-3CD1-401C-A936-5C776120EE14@petmystone.com>

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


  reply	other threads:[~2006-06-26 18:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 17:29 Timothy Stone
2006-06-26 17:34 ` Peter Stephenson
2006-06-26 17:56   ` Timothy Stone
2006-06-26 18:14     ` Michael Hernandez [this message]
2006-06-26 18:45       ` Danek Duvall
2006-06-26 19:03       ` Timothy Stone
2006-06-26 18:15     ` Peter Stephenson

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=3EBBCB06-AA3E-44B0-9F18-189D3A8BAE7B@gmail.com \
    --to=sequethin@gmail.com \
    --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).