From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15861 invoked by alias); 11 Dec 2017 00:19:24 -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: List-Unsubscribe: X-Seq: 42105 Received: (qmail 22041 invoked by uid 1010); 11 Dec 2017 00:19:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f52.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.214.52):SA:0(-1.9/5.0):. Processed in 1.167453 secs); 11 Dec 2017 00:19:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=zdgdAlRBiAZJzC5V+s3hotnzIXQJstOscdFddzpmH80=; b=eC3P0JYznrWxZiF63WY4igU/UlXcfabpapiVv/ICKY9+1wpXKo9x/HClvAIX8s89+N 99uK7VIkT1jD7ePYrDYCPLXmFce6dCT3G3VwfhO8wiINTuCliFKEgU9H/8PxEcRANirw 8GCymVH6xHakTu6ts5eFsU0i53np9oNyWVCL8sbcG32KRBgf/UKoTjFVE7/77ub4iQEf 6eqvIbkNbjZBJUJFb9ObgOKWM1HjGKvVveoY0x4npnw/GazfWjdyvlDtU/fCYNwc9IGT Y9SiymtawNDgp6L7Q6i9kxXgp1KL16sgNvmx3vc4hnPHZp5YbrqJY2qoo47IouV33+Db RBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=zdgdAlRBiAZJzC5V+s3hotnzIXQJstOscdFddzpmH80=; b=NyIIYEdgQyyU31nWOQUKqtGHZxyXuzqtg6fuo62aCl5VFFHfK4Df2D7NalixwIrPcX 4dWkXrRd7WZTYgFcHXxvVdx7DCg+X6mFb/PuRkLez6673YZcREAvG3WTVwljDk8xbLRO j4UsNG2KV3VJeDW685JANuIBs/5U9b/a+Q2mXK28ryZHh+GHpCFstwMAgKflq4wahoEc yNjBA2ZGbTjW3AIaAz4NJ2/vNb+/q5I6JUYlnRROGWSHepYATsoY2Ld/8IVraUL+5CDF C6hedCbLYcn9fXPJ4bFZEdxxnTuGor3QvUklEiA9fNTwISkYX0/b6FQUKpnATrMkuUZN CCBA== X-Gm-Message-State: AJaThX6uv+5nC0Dhfdpj5N8Iw1k9Qn329tHBG/2JJogltDzakKC4LaAD e+7t7pd5bvrQEzcTvmQPzueaD3st7GY= X-Google-Smtp-Source: AGs4zMYa5N3LNZ/ImgFea23t1A+5bQUgtAsNXRpwkoZfgYQyLtlODev/b8J8yWjS0Vr86Y2Bfg+m/g== X-Received: by 10.107.78.10 with SMTP id c10mr54881369iob.34.1512951560064; Sun, 10 Dec 2017 16:19:20 -0800 (PST) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [BUG] Redirect between two parameter assignments causes misbehaviour Message-Id: <86CB677F-70BF-43B2-8F6D-E8F0AC4C43A3@dana.is> Date: Sun, 10 Dec 2017 18:19:18 -0600 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3273) One more before i forget. Someone found this on IRC today and it puzzled = us. The following command produces no output (and returns with 0): % a=3Db 2> /dev/null c=3Dd env Doesn't matter what the command at the end is, could be a built-in too. The documentation seems to suggest that it's valid for redirects to be interspersed amongst the assignments *as well as* the command arguments, = so i think that should work? If not, the documentation needs clarified. This is generally what happens to the variables afterwards: % a=3Db 2> /dev/null c=3Dd env; print -r -- ${a:--} ${c:--} b - Though it seems that certain interactions with other code can be quite = serious. If i run this without -f, something in my profile causes this series of = commands to hard-lock zsh with 100% CPU. Entering the first command and then the = second one separately avoids this lock-up. Unfortunately `set -x` didn't reveal anything and i don't have any more time to look at it today, but i = thought i'd mention it. dana