From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12041 invoked by alias); 12 Jun 2018 01:55:56 -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: 23470 Received: (qmail 6270 invoked by uid 1010); 12 Jun 2018 01:55:56 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f169.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.216.169):SA:0(-1.9/5.0):. Processed in 0.822093 secs); 12 Jun 2018 01:55:56 -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,FREEMAIL_FROM, HTML_MESSAGE,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: ericdfreese@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=08S2BtzXoqFNjWl9uupySWIItl9e3ZJnKwj8M6ZmQ5U=; b=nueQ4HHrvPOXu2WLUo4uGSo9HlBPcH8tF1ojCWiCXEsznguhg2pyKUWis+s072w9jn T2GfMhuuGtNuEON2c9b1dzexQmqPhuXhs41q9AyInCoFNNOpU8y8+IcIKkdZ6m7pFOMC rHa391paSTnSDOXaXaUeFnyalE35S7QbYnyxkvzOGQIcJ+5PieXvuQifkd8y4Z3l4Gen ThHjph9Z15/ImkZrUmUkKpn19JpJVWwqduzmAaeZKxFFoJMtFyDEJAbLt0op825L8+6g 568w9LBDtrVZPmgAkSuLqTnx9vEcMOXW1or3yux/geDAH8x7EMldP8fHastbOts4/StF MevQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=08S2BtzXoqFNjWl9uupySWIItl9e3ZJnKwj8M6ZmQ5U=; b=Nd3ejU3DkofWuvB+BRvZ7c+yLFinoXAqsiuvOe2JLVMXaxec7/jfy/FhK01jnWikDq ZSfBFD5QEjSjd2vE3iHVf6Rbzy9SbpV1ZHuJV+ZDC3Fxgv2BN0brB+cKvrAsVUSRvfQP vuvMMTJeTPUUKU4oe6Vg3Vjat0fsfUvqUq15bIGkWI0TQEYN1Abp2h6FkOuOP/jDo87p JqY6oJUJ+YrFYcKSrwa7XsEJohNkXqBsAs2CsA7APMR5ZnK9qbH2A4gZIsxVO7+nDX5Z 1YiSMXRqc0c0iY4ZsATZxZG+SKCYX4ZahXwUNO/1UEkE1Jq1uVRJndcW0jVhZHYPn5NE 8uUg== X-Gm-Message-State: APt69E3FZ4F4srqKrFaUZ5XpdnAtUzndIDwcnSNMJf9ZCRtN1Y89a02U oT6k3K+gCR24FAf/fSDRRUkomxMi7VWuLF9WWG0= X-Google-Smtp-Source: ADUXVKI0fIaClhSxu9tZeOWX9LbRo7lKhMIHk5FNwJpyMbfpYAJXdAbL72N36Gu4vO0GG7CCM8KOE1cukfDAU40vL+U= X-Received: by 2002:ac8:7349:: with SMTP id q9-v6mr1694923qtp.132.1528768552709; Mon, 11 Jun 2018 18:55:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Eric Freese Date: Mon, 11 Jun 2018 19:55:32 -0600 Message-ID: Subject: Re: Anyone familiar with auto-fu.zsh project? To: Sebastian Gniazdowski Cc: Zsh Users Content-Type: multipart/alternative; boundary="00000000000087338c056e682a62" --00000000000087338c056e682a62 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Do you know if there is any way to get the PID of the process spawned for process substitution? It looks like `$!` doesn't hold it as it does in bash= . Ideally I could kill these child processes when they're no longer needed so that long-running ones don't tie up resources unnecessarily. Eric Freese 303 875 2359 On Mon, Jun 11, 2018 at 3:46 AM, Sebastian Gniazdowski < sgniazdowski@gmail.com> wrote: > On 11 June 2018 at 10:25, Eric Freese wrote: > > Wow this is much nicer. I've implemented on `develop` branch of > > zsh-autosuggestions. > > Decided to do the testing, it's just checkout of develop branch and > then normal everyday use. First impression was that suggestions appear > very quickly, faster than with zpty. > > > Thank you! > > n/p, I use this in unpublished logger. Background process is started > on demand with <( ), which happens when someone logs something with > zflai-log. It stores to SQLite, MySQL, ElasticSearch, plain file. All > works without any problems, and logging into <( ) spawned process has > negligible duration, that's the point =E2=80=93 someone wants MySQL logs = but > do not want slowdown. > > > Eric Freese > > 303 875 2359 > > > > On Sun, Jun 10, 2018 at 11:24 PM, Sebastian Gniazdowski > > wrote: > >> > >> Hello, > >> I've just implemented async feature without using zpty. From what I > >> saw zsh-autosuggestions uses zpty to look-up the suggestion. Maybe it > >> has some drawbacks and you would be interested in using <( ) instead > >> of zpty (it's probably still required to capture completions, though)? > >> It's similar to using zpty: > >> > >> exec {PCFD}< <(-fast-highlight-check-path) > >> zle -F -w "$PCFD" fast-highlight-check-path-handler > >> > >> -fast-highlight-check-path-handler() { > >> if read -r -u "$PCFD" line; then > >> ... > >> fi > >> zle -F ${PCFD} > >> exec {PCFD}<&- > >> } > >> > >> <( ) process is automatically disowned, I've used it in 2 projects and > >> it works without problems, very robust. The effect: > >> > >> https://asciinema.org/a/V18uHIn2BR0OVfRsmxyqkVi7K > >> > >> -- > >> Best regards, > >> Sebastian Gniazdowski > > > > > --00000000000087338c056e682a62--