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=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,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 a404667f for ; Mon, 2 Sep 2019 14:02:00 +0000 (UTC) Received: (qmail 83 invoked by alias); 2 Sep 2019 14:01:53 -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: 24196 Received: (qmail 23169 invoked by uid 1010); 2 Sep 2019 14:01:53 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25559. spamassassin: 3.4.2. Clear:RC:0(209.85.217.45):SA:0(-2.0/5.0):. Processed in 1.29376 secs); 02 Sep 2019 14:01:53 -0000 X-Envelope-From: pierpaolog@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.217.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 :cc; bh=7xnzCfCAYuHXwXgGiO9UI8/Ibfzs/sV6BU0qSyptp1M=; b=pnkxQPr91/oTEq+QhjgruXeWjf5c9x0aP6Hr9O/LXJV8qY/j8FwfyQMUb6vBKyuZ0g 8tSsAatY18LFWTW9mRLkNXHlT19Xn6bxhsaWskhWrN2DLIJPs9sas1Lxa0ivZ/kEd6qU 9uzwwrysiPTVSZX2J3hneNN6mtikCCJ9vdJq6yX4VYjiAM9KMa9+POPqfywXZSQZZUa6 svsOs2rdUPbN+U4ah1EpHy6R2t7KA/JnTQvuddKAUKcZQc+u+cdYhP+nwSmNMmTCMUNG zqVxpylj7PF/22e2oGf1zDVnaEciADre6cZDM+Ir0kB59sa2IfmJ7tMhZHv70vnh3V6J 4boA== 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:cc; bh=7xnzCfCAYuHXwXgGiO9UI8/Ibfzs/sV6BU0qSyptp1M=; b=fGY2DDGS1YOnr1f66k/Mmvd/HpSTvAkZaXOytVECGiP6+EXJLPeUfyfPUyt5VQE7pw 01cpqjhwpRHGvgsErP9SIHKHfPFE+QPXTajJMsRwuguMT2lbJ1s4XUhTRUJkoya0SgSw iV7ubWQDC+vego7THKSfRlc6MTqKj1kxcodQSag3MM9H/dDWrB75fFq028s8rOJXU9Kh D0ku+Lpr3/zotzBqGN644+5nVEmo9qpyLiF9PYPHTx50EA8O4s4GaLNqU8dvTnZuPo0Z T1OpIgfct+MmSRWf2pXIQtZx+FYMpYi83KN3TZlms6r0vRBKFXJUZRev5s2+I977Uqtf uVpQ== X-Gm-Message-State: APjAAAVn7Ihcl2MohzCaI88DcHsb1dMjIEB9hkuraO677w3IS2xds/Rf SrmqwTfXOxMDCm5zafvereKVp9cDHLjbnlkmoO3oOg== X-Google-Smtp-Source: APXvYqwfCLC7MDshHO/w9ZLyM33UAKuaHYJ6A9kYu7a7zuR4lfP3INc0yPtzZFfg8bryRH9S3hWpkUsvNooP7k+VOcc= X-Received: by 2002:a67:ec10:: with SMTP id d16mr15858882vso.220.1567432878171; Mon, 02 Sep 2019 07:01:18 -0700 (PDT) MIME-Version: 1.0 References: <3A161CB3-442A-4E0B-9A0E-1C62A72DF6DB@icloud.com> In-Reply-To: <3A161CB3-442A-4E0B-9A0E-1C62A72DF6DB@icloud.com> From: Pier Paolo Grassi Date: Mon, 2 Sep 2019 16:00:41 +0200 Message-ID: Subject: Re: Weird behavior with redirecting stdin To: Aryn Starr Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="000000000000e9a844059192674a" --000000000000e9a844059192674a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable hello, anyone has suggestions on this? regards Il giorno lun 2 set 2019 alle ore 15:59 Aryn Starr < whereislelouch@icloud.com> ha scritto: > With these functions: > > ``` > fcm () { > # Function for selecting a command interactively > echo ${(F)commands} | fzf > } > > teec () { > # Dumbed down version of a function that both echoes and copies to > clipboard. (Current toy version just echoes.) > local out=3D"$( print -r -- "$out" > } > ``` > > I can do `fcm | teec` and it works correctly. > However, if I change `teec` to this: > > ``` > teec () { > echo 'echo hi' | { eval "$( local out=3D"$( print -r -- "$out" > } > ``` > > Then running `fcm | teec` hangs (after printing `hi`) and doesn=E2=80=99t= even get > interrupted with ^D or ^C. > I don=E2=80=99t understand why these problems occur at all, and I have no= idea how > to go about fixing them ... --000000000000e9a844059192674a--