From: Mikael Magnusson <mikachu@gmail.com>
To: TJ Luoma <luomat@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: [[ -o interactive ]] vs if [[ -o login ]]?
Date: Mon, 15 Aug 2011 01:24:10 +0200 [thread overview]
Message-ID: <CAHYJk3Sh=Bo+Z-50y03RjE-ZpZrcVOqvHvg01L3TOg2k5o1NNA@mail.gmail.com> (raw)
In-Reply-To: <CADjGqHtVSHJbdrHfJVR9T0uZ0my-Xb396-3k_ZA_fZgD24phdA@mail.gmail.com>
On 15 August 2011 00:46, TJ Luoma <luomat@gmail.com> wrote:
> If there any reason to prefer
>
> if [[ -o interactive ]]
>
> rather than
>
> if [[ -o login ]]
>
> ?
>
> Are they two ways of saying the same thing? If not, could someone
> explain the difference?
login is only set for login shells, interactive is set for all
interactive shells. I suspect that doesn't help you a lot though since
that part's pretty obvious ;). A login shell is something that is
started at the beginning of some sort of session, like logging in to X
or the console, and it will be started like $SHELL -l or -$SHELL (with
a - prepended to argv[0]). Any time you just open a terminal or run
"zsh" it is likely not a login shell, unless you configure your
terminal emulator to always start a login shell.
--
Mikael Magnusson
next prev parent reply other threads:[~2011-08-14 23:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-14 22:46 TJ Luoma
2011-08-14 23:24 ` Mikael Magnusson [this message]
2011-08-14 23:25 ` Michael Shick
2011-08-14 23:28 ` Vincent Lefevre
2011-08-14 23:44 ` TJ Luoma
2011-08-15 0:12 ` Bart Schaefer
2011-08-15 1:28 ` Vincent Lefevre
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='CAHYJk3Sh=Bo+Z-50y03RjE-ZpZrcVOqvHvg01L3TOg2k5o1NNA@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=luomat@gmail.com \
--cc=zsh-users@zsh.org \
/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).