From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3946 invoked by alias); 10 Apr 2015 01:31:13 -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: 20119 Received: (qmail 26835 invoked from network); 10 Apr 2015 01:31:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=C5GdcoBxWIx/mcrhCacVnqeNO2ZhOo4RhjaMzcJRf/U=; b=fuhcWNRgHnhZXwGurFR7Ii8TRcd3bgTPx3nLuuU8qoSOz//GxSnEY43jZ2YgVarhdy 4Ncx4yA3/xCNYUgXRR1XhGKgvgC/iPjFw0NYpOizn3ZlzbbO4xR426LagVHGt9Z2OPJS Xsl+YZfiNivfO0rBTgSIoM65jWtapES+FtLAlDiNBCbUq6DDt7FJKEbdHXvUIQy7RkjT CxrVz2YpCnrX5mu3N7bl1klzAYx3VCqjQQkG1d7oN009TUZwoeRI8FOIsC/6stRLsI9b IY5yd2rwW7yDjOGdnl+IuwKCQkslwQyuNtlW5IXcYrEW5HLz1S9IXwJEMZfnf5K6c6sk ndHQ== X-Gm-Message-State: ALoCoQkeOgRvRNvGQPHCKbftrcsgY9//YE8qEJwuVzbI/DqtMJIjQVqHCfHCRngED5MCupNuXDx7 MIME-Version: 1.0 X-Received: by 10.152.239.135 with SMTP id vs7mr6856973lac.104.1428629464278; Thu, 09 Apr 2015 18:31:04 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Apr 2015 18:31:04 -0700 Message-ID: Subject: Re: `[[ -n $VAR ]]` equal to `[[ $VAR ]]`? From: Kurtis Rader To: Thorsten Kampe Cc: Zsh Users Content-Type: multipart/alternative; boundary=001a1134788cbbf47f051354b708 --001a1134788cbbf47f051354b708 Content-Type: text/plain; charset=UTF-8 When I run the following [[ $VAR ]] && print yes I get a parse error. Which is what I expected given the documentation in section "Conditional Expressions" of "man zshall". Are you seeing different behavior? What makes you think a bare variable is a valid expression? On Thu, Apr 9, 2015 at 6:23 PM, Thorsten Kampe wrote: > Hi, > > this is kind of a follow-up to > http://www.zsh.org/mla/users/2011/msg00284.html . > > Basically the solutions were `((+VAR))` for zsh and `[[ -n > ${VAR+stuff} ]]` for bash and zsh. > > Now my question is, isn't `[[ -n $VAR ]]` equivalent to `[[ $VAR ]]`? > (`[[ -n ${VAR+stuff} ]]` equivalent to `[[ ${VAR+stuff} ]]`) > > Thorsten > > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --001a1134788cbbf47f051354b708--