From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15335 invoked by alias); 21 Aug 2015 04:16:43 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36257 Received: (qmail 16446 invoked from network); 21 Aug 2015 04:16:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:to:subject:mime-version :content-type; bh=tBi6ItINpxIUCqGWe0gsLlssj7o8CxyzUL5DUN3yHf4=; b=VIrvf3b8p5/Kvrcrcuk/xwGqa877Zvd73n1KwBWGjMyYzobjQ8waNzsQCZdGxcCvqj yVCClFSi8yidlhDDVdUO3K/QsUFuASdcObLh9Dvo2KPWiXCO2mxM9deQ7A0wikprqYt0 dS66XL6B8mW7TVmlV1fiVvbj9tyNhyBxEnjvgqzwtDLljCYIycUPyt3m8Flb/ymLE02o wambA9pqAlIhoW7StQDaqRjdHtSaSDyKI9iOi+0CWpa8FdMrLUcovZDDy2OpZK4AHWN1 sEAcWYfnpqizMovqblvdb6prCLSWJw+7dP56ki7tLSJ0gJ4gI6ZJToUwmx5ty888gn1u CYKg== X-Gm-Message-State: ALoCoQkSrfnEcSqG+KrNhMLazg+8/VEJDYgPWH/o/pSTEcP1PDClAnrcZVU9QhFgKjHMDr53UuHg X-Received: by 10.202.243.215 with SMTP id r206mr5289569oih.106.1440130601432; Thu, 20 Aug 2015 21:16:41 -0700 (PDT) From: Bart Schaefer Message-Id: <150820211638.ZM29649@torch.brasslantern.com> Date: Thu, 20 Aug 2015 21:16:38 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Anonymous function syntax and "sh" emulation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This works in both zsh and sh emulation: () { print hello; } So does this: function () { print hello; } This works in zsh emulation but not in sh emulation: function { print hello; } The error is "parse error near `}'". If you write it as function { print hello } then the error is "parse error near `print'". Since this is the example syntax in the "Anonymous Functions" subsection of the manual, it seems that it either ought to work, or there ought to be a warning.