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 3f0d1a82 for ; Wed, 5 Jun 2019 07:58:31 +0000 (UTC) Received: (qmail 7203 invoked by alias); 5 Jun 2019 07:57:52 -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: 44401 Received: (qmail 14019 invoked by uid 1010); 5 Jun 2019 07:57:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f169.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25468. spamassassin: 3.4.2. Clear:RC:0(209.85.166.169):SA:0(-2.0/5.0):. Processed in 1.77923 secs); 05 Jun 2019 07:57:52 -0000 X-Envelope-From: mikachu@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.169 as permitted sender) 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:content-transfer-encoding; bh=PtgJWuAWMv2tVDvnKXJzk5c216mS5QrZHoHZA3NOWrU=; b=e9kZeC3Z77nuzKyW/E2589u80TzMfaW3S4zfpnSlRDX2GyiMwthuBCTX5ubB3P0Mm9 ChDY6du7t0mQKdNRO3UwjopZ3WTEIyNb7j0tTlY5RnPyWLtLMD9Iwxyk1GCeBitC2dyf 1cFMzzySFGJSYb46hl1K2gfDqstt9c/9kQJ+VnOxfY0FymQHYWIMTy3JqzfnC1JHcl9C qG+SXHrHOoWg8xwPHhfnsK41Sma1bkzWfbaIW+3RFIJ7sj1K/UIR3wXGsZPdEuHuJgOz 415hvgQkUtnMgKirv987LD4q74ZGbJFSi9DRvTP3Nt3U8X2h/VUP73xrpXqIpgF62nBy EEug== 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:content-transfer-encoding; bh=PtgJWuAWMv2tVDvnKXJzk5c216mS5QrZHoHZA3NOWrU=; b=YV6rTMb2YMRNG1aAmUv1Z3Awvw31f+L2w9AfEeaBixS3oVWAvrCWgyaVjop3uk5+mk CaJ/wQnrxcCWagLUzYTf/X4dYr9mrCS1+dkNcKNQnJsKR28ryJOG5c1jVdkyFlGCPmAN WrxKkgzMCXEpDHvg93rCnmL6fcaZ2ZpLm6S8RqrYt+SRIRI7IZs4s/6i+YSIzgnWAVg/ 3S3qDz+4aRbQa7jT/KRCsYivQHrG4dRjrO3Jj81p/r0P4jiH5+g3XErtJjfzovjyGTcy 427I2U5whOIfovrv4nW6XzxnZNhvbZV/JNKK8uoKWWyiDp1I1PPT5N/CQO8CBPiWlgNe 18eQ== X-Gm-Message-State: APjAAAWl8eX5bbE1AInpvXZDG3jXNcPfaSp+E2VUcYRrl831YCzrLaAj mN3zzvdK8IPNB18IRRJvfDYq+ERXGlDZGfyv/Pk= X-Google-Smtp-Source: APXvYqxH94fEtIXAyi+iXBAQoMXuc0RKEC9ObW0NLJSGjenYiIl18sWpL6kmW6aoOg6xRcKH07XOFjcQzjkF5jY4iU0= X-Received: by 2002:a02:5488:: with SMTP id t130mr25790946jaa.20.1559721435896; Wed, 05 Jun 2019 00:57:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Mikael Magnusson Date: Wed, 5 Jun 2019 09:57:14 +0200 Message-ID: Subject: Re: Asynchronous completions? To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 6/5/19, Sebastian Gniazdowski wrote: > Hello, > I've just waited a bit after: git checkout . The delay was caused > by the completion script loading all revisions, while I only wanted > branches. > > This gave me an idea =E2=80=93 to use exec {FD}< <(...) and zle -F to upd= ate > the completion, after first displaying "Loading all revisions". In one > project I'm passing as much as 13000 lines through the {FD} after each > keypress without any problems. ... > I'm not familiar with coding completions. Could someone else start the > async-completions trend? async-completions doesn't make any sense, you can't do anything else while completing and you can already abort it by pressing ctrl-c. If you want to show a message first, you can already do so, it will be overwritten by the completion list once that's finished building. For example I wrap the complete-word etc widgets with a function that changes the cursor color, and then changes it back after, but you could display a message instead if you want. function _generic_cursorcol() { #zle -R completing... cursorcol cyan { _generic "$@" } always { cursorcol_normal } } () for 1 { zle -C $1 $1 _generic_cursorcol } complete-word reverse-menu-complete complete-word menu-complete menu-expand-or-complete --=20 Mikael Magnusson