Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
'login' vs 'interactive' ?
- X-seq: zsh-users 19400
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: 'login' vs 'interactive' ?
- Date: Tue, 18 Nov 2014 11:11:46 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=OHKNubOkG6MdO8RrpaS0d5Yfe3sJw+9jUVqSdsU5+Zc=; b=cgZaEot+HzmQhvs356BfXDfm/+7bIDBFSscEdSxhL+ZasI4iKHn7sq4dZLkWcSZ0lQ /zlWp3TrnjkneAilnNCMpq3q+3+wVemgEDb8R5e9/DI0g1LD7y6dx4egkydZfyAtZJRE EWXxttPeQIPdLsm2GI9nkxnKE30+RBvu4nXZRl0EhDP4nI2OMhO+2+PBJPf1KamFWXAN BfgYuXJsGtQMeHViVWDGIr3G7aaiE9cUq4A9Vq0+/A8opWMe+6Wf/TPMN27Fj2qRuVxz ajY100OV/Otd2FvDAufP/upjsUjeHiyfVlOM2do86rrb+mtITNeNp+jsndeCical0WV/ YkSQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
1) Can someone explain the difference between 'login' and
'interactive' in these two examples:
if [[ -o login ]]; then
echo "I'm a login shell"
fi
if [[ -o interactive ]]; then
echo "I'm interactive"
fi
2) is 'login' vs 'interactive' similar to "every square is a rectangle
but a rectangle is not necessarily a square"?
As in "Every login shell is interactive, but an interactive shell is
not necessarily a login shell"?
3) Imagine an alternate universe where zsh _automatically_ reads
~/.zshenv but NOT ~/.zshrc so you had to tell zsh to read ~/.zshrc as
part of ~/.zshenv.
Would the answer be:
if [[ -o login ]]; then
source .zshrc
fi
or
if [[ -o interactive ]]; then
source .zshrc
fi
or does it matter?
4) Anything else I should understand about these two?
Thanks!
TjL
ps - I swear I knew the answer to this at one time, but I can't
remember it, nor has Google helped me find the answer.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author