From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7768 invoked by alias); 14 Aug 2011 23:30:49 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16227 Received: (qmail 15547 invoked from network); 14 Aug 2011 23:30:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.213.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QlqcDoeui+lWbn0Y8pr2xKdhxxKgXVSekGXZNuVEh0Y=; b=cTtO46xK8G64+hq8F9+bVcajQ01q70IFx2SQGy0IjDrVf29NPFncRzTgF/2aKusjsB LWHg8WmzUYyiez1eStxl7hz3mL6qw0kmapPNzjxey7zf6+wumEQesu+3Z8Nm1y2m0Xra 2+MtZNpCFpfJmRHMphq2D1UNIf1Q7nhXIjrzg= MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 15 Aug 2011 01:24:10 +0200 Message-ID: Subject: Re: [[ -o interactive ]] vs if [[ -o login ]]? From: Mikael Magnusson To: TJ Luoma Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 15 August 2011 00:46, TJ Luoma 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