Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is it possible to disable cursor movement when running completion?
- X-seq: zsh-users 23926
- From: Eric Freese <ericdfreese@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Is it possible to disable cursor movement when running completion?
- Date: Wed, 10 Apr 2019 16:22:46 -0600
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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=/uoq6+0RkVhwO6NumiuIXSFwHWvcXwF7OT1q2P/eTHw=; b=RM32IF41pxKlxkJyZSEbdT8oWlOwQD/5QL3rV5kuMpF/PRpsOxH74OiSh/cm32sMeX 93KddfCJcp0dD14Cl7Wl8WWbRlvutDZbBukOwG/Es7PPzni3hZKRg5sDwir7+1W5Pt3X ba0vjW38ZFUwrQAExgOrzWSi/OvmTL3xbwucFTpokKlaKkdWrV56K7oyKpwee6HvbuQF G2ja/1JSO6ZGt8EnsLdo9pq1T4UYl061zPm4xkfAUdqImxzoTD1xGNq9+gqTYw3ls/mn 4dcdysQ/rFl7H4Ak2FWCfanaWZvNlqvBGBPOyxnJxmhh2JiLp35aqavW/HEn7at1TnRD cAJg==
- In-reply-to: <CAHYJk3Q-Tpb9zGXoj_TFPH4BDhr9zHa4bPo0CambrenvmSLriQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAAikoALN2aEJWgLvmcKKhpjfOSzVk1uOih_gepv7CAfrpqMMCQ@mail.gmail.com> <CAHYJk3Q-Tpb9zGXoj_TFPH4BDhr9zHa4bPo0CambrenvmSLriQ@mail.gmail.com>
> If you don't want any completions offered, you can simply not press tab.
Makes sense. Unfortunately I'm needing to apply the answer to this question
to
a more complex use case.
I'm using a pty (via zpty module) to capture the first completion result to
display as a suggestion in zsh-autosuggestions plugin. See the GitHub pull
request here: https://github.com/zsh-users/zsh-autosuggestions/pull/401 and
the
issue that triggered this question here:
https://github.com/zsh-users/zsh-autosuggestions/issues/354
I'm wondering if there is a zstyle that I can set to avoid this
cursor-moving
behavior. I've scanned through the documentation and haven't seen anything,
but
I feel like I could easily be missing something.
Eric Freese
On Wed, Apr 10, 2019 at 2:21 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 4/9/19, Eric Freese <ericdfreese@xxxxxxxxx> wrote:
> > Hi all,
> >
> > When I run `zsh -f`, type `ls "/"`, and hit tab, zsh moves the cursor
> back
> > to just before the closing quote and offers completions from there. If I
> > hit tab again, the buffer is expanded to `ls "/bin/"` (the first
> completion
> > match).
> >
> > Is it possible to disable this behavior, such that when I press tab at
> the
> > end of a quoted string it does not move the cursor back and instead
> offers
> > no completion?
>
> If you don't want any completions offered, you can simply not press tab.
>
> --
> Mikael Magnusson
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author