zsh-users
 help / color / mirror / code / Atom feed
From: Julien Nicoulaud <julien.nicoulaud@gmail.com>
To: Mailing-list zsh-users <zsh-users@zsh.org>
Subject: Minor annoyance with slow completions
Date: Mon, 1 Jul 2019 18:44:39 +0200	[thread overview]
Message-ID: <CA+mcLN7J6ZvsQU8fZCGF08SgJvHC6SpYT0s+c3iKZm+F3EfSMA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

I have this (bad) habit of spamming the tab key more often than necessary,
and this leads to issues with slow completions (eg: systemd completion, did
not dig into that but sometimes completing services takes several seconds).

So sometimes I start typing something like "sudo systemctl status d<tab>",
completion hangs, I continue typing it by hand, and after a few seconds the
completion match is inserted followed by everything I typed in the
meanwhile. In a similar way, hitting tab several times after completion is
triggered produces unwished results...

I would prefer this kind of behaviour, in order of preference:
a) any keystroke after completion is started cancels completion. special
case for <tab>, which is ignored
b) any keystroke after completion is started is ignored

Did I miss something ? How would you implement that, define a new
expand-or-complete widget that unbinds keys before triggering completion ?

Cheers,
Julien

                 reply	other threads:[~2019-07-01 16:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+mcLN7J6ZvsQU8fZCGF08SgJvHC6SpYT0s+c3iKZm+F3EfSMA@mail.gmail.com \
    --to=julien.nicoulaud@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).