From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 373ef8d4 for ; Mon, 29 Jul 2019 00:04:56 +0000 (UTC) Received: (qmail 23525 invoked by alias); 27 Jul 2019 07:22:37 -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: List-Unsubscribe: X-Seq: 24098 Received: (qmail 5330 invoked by uid 1010); 27 Jul 2019 07:22:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25517. spamassassin: 3.4.2. Clear:RC:0(209.85.166.45):SA:0(-2.0/5.0):. Processed in 0.788453 secs); 27 Jul 2019 07:22:37 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.45 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=kY1kT965gNTp9UGGB2Yb5MNn9Wd2WidS8sGnuk9X9yc=; b=sWJuHethUA5lmvVLeznVyuvCmtHfiLObCVKQe5OvFlfqNTteWFMe3gH85kjrC5Ih08 tegpmnySF+I2+3W3pK24euMttSZIkD1N0ORkHKBpZWAU4UO8azlDvYrmXTCl4Hw5S1kk gG72KTKadr7JeysiEGkcqZ3rj8n0ZTUOSQt10jzr0T56KD/9t7ryUHg5n2YAF+HUN+a2 51Zlj2rOlit5GgYNGLcdIxyOS2YU8ZSGGhD33De8ymdmfFYBbCIIldrQ6kqqUs/HZ77l AQkaKCTYCuRp6uKwtSS8a0bwl8Y4hAgkPGfFLyWp27oYLMd9o6e+ZfFNgATH9S2Xug8K +LKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=kY1kT965gNTp9UGGB2Yb5MNn9Wd2WidS8sGnuk9X9yc=; b=FWzH/pws/HJ7y6JlPpC6frLokPIkhBJMwsnVy8rIlDmYOMbhyJ8im/pa3w9Zp01D8S 1XvfW6kHM+nmOT1TlGpbkBZfdtdKoNaK65qcmTP92RKtbDxSY6hkuOuzvG/fdmiQudJN te710Fxc5c0SurkWUZhOU+XlHwxAgOGXSridQPUp5bG+7PfQJOExNhN4xoyZQc15TkFW lAC4fCjb+gFGqccizw6JpjessmlsUZRNh02e3HDTBilpPLzGvQo3vBRIhqmtXTUPmRap mwDzh1J0lQ9Ue+nxtzZlSMN3lCCpdoA2Gf+mdvjBbslkgJr+plm+0OYTcw5YzleiCLoV 0OkQ== X-Gm-Message-State: APjAAAXAW9wZRp9vHd5Q9GzsMknR9XjFcHWoAcNDlr/K+drzA53bC+v4 8nYCTgh3wcPRY8I3zJX5eOdGBdm1zBsFc6LK3X0fd47X04cJEw== X-Google-Smtp-Source: APXvYqwJNialigzz+F+qb7bnczVvgrqw0i9MZj6kJZAwKd37qy8MxZAgRDIgTXaaAc6uM8V4LooKJWChgOHc6/dH/f8= X-Received: by 2002:a5d:8890:: with SMTP id d16mr43908834ioo.274.1564212123437; Sat, 27 Jul 2019 00:22:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Sat, 27 Jul 2019 09:21:52 +0200 Message-ID: Subject: Re: status and pipestatus To: Zsh Users Content-Type: text/plain; charset="UTF-8" Here are a couple of examples where I don't want to use pipestatus. Command: false | false; x=0 State after running the command: status=0, pipestatus=(1 1) Command: true | true; x=$(false) State after running the command: status=1, pipestatus=(0 0) In these two examples status comes from x=..., while pipestatus comes from the previous pipeline. Roman. On Sat, Jul 27, 2019 at 8:43 AM Roman Perepelitsa wrote: > > I'd like to use status and pipestatus special parameters in a precmd > hook. There are cases where status gets updated between two precmd > invocations but pipestatus doesn't. In such cases I don't want to use > pipestatus. In other words, I want to use pipestatus if and only if it > corresponds to the same command from which status was derived. Is this > possible? > > Roman.