zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: completion inside vared
Date: Sat, 19 Feb 2022 18:27:43 +0100	[thread overview]
Message-ID: <CAP+y1xCXLvK65BEfG2Cx9+SBnsDGu1xWS9PLzqg4TJ3EfczhZg@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7Yj2QB1aJw0CwxXKPuV=ZHzjOx-R19B=qwPyQ-z6BfYeg@mail.gmail.com>

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

yes that worked (apart from a space to be added between [[and $ funcstack),
thanks.
I'm having another annoyance:
when I exit with ctrl-c from

vared -ehp $prompt text

the history file gets emptied. I tried
trap 'zle send-break' INT
but it doesn't change the result

Is there something I can do to exit from vared with a key combination
(ctrl-d only works if the line is empty) without losing the history?
I could use zle to send the kill-whole-line widget, but how do I send
ctrl-d then? Is it possibile with zle to send key combinations?

thanks

Pier Paolo Grassi


Il giorno sab 19 feb 2022 alle ore 00:39 Bart Schaefer <
schaefer@brasslantern.com> ha scritto:

> On Fri, Feb 18, 2022 at 3:09 PM Pier Paolo Grassi <pierpaolog@gmail.com>
> wrote:
> >
> > does anyone has some clue as to where I can find how to do this?
>
> Been busy and didn't have a chance to respond before.
>
> The _in_vared completer forces use of _value which calls _default.  A
> side-effect of _default is that compctl completions are attempted.
>
> So what you need is:
> zstyle ':completion::complete:-value-*:*' use-compctl no
>
> Or if you want it to be specific to vared, something like:
> zstyle -e ':completion::complete:-value-*:*' use-compctl '[[
> $funcstack = *_in_vared* ]] && reply=no'
>
> which admittedly is a bit convoluted ... _in_vared probably ought to
> be doing some style checks of its own rather than pushing everything
> down to _value.
>

[-- Attachment #2: Type: text/html, Size: 2263 bytes --]

  reply	other threads:[~2022-02-19 17:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 10:01 Pier Paolo Grassi
2022-02-18 23:08 ` Pier Paolo Grassi
2022-02-18 23:39   ` Bart Schaefer
2022-02-19 17:27     ` Pier Paolo Grassi [this message]
2022-02-21 19:27       ` Bart Schaefer
2022-02-21 21:55         ` Pier Paolo Grassi
2022-03-11 17:37           ` Pier Paolo Grassi

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=CAP+y1xCXLvK65BEfG2Cx9+SBnsDGu1xWS9PLzqg4TJ3EfczhZg@mail.gmail.com \
    --to=pierpaolog@gmail.com \
    --cc=schaefer@brasslantern.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).