From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7718 invoked from network); 19 Feb 2022 17:29:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Feb 2022 17:29:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1645291758; b=i62ZklMZ5AxN+NIKML8GzFxS3XZITc8mZ8t/3xc+tHeXPActLC5QPN4fhisLLhv9M1pa46zkZT uzYgv+QYs+C7/d9+J2BHhn03BO6wZ7NhHGgBoksjSZFKmUpWCXbHo+38e2enJjsD5vSSrGI1PN 11O08D2UlcXhOsHy1Zwx0y1YNYpbS4Wa6X9gh8zk8jTgZZEs5sqXrm32ZPh9shBF7QD4DoRDx4 fibMYEztgt3tNiGfKCZtQnxLUXw6UUwyULzFNe3yfyK+eUa2MTpbrZWOCS1GgO4Y0yyOec8CiH dA0cI75D9HJOF6GwdMVAeiG9zDYTkWQByXYn4Iki/ftvvA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f54.google.com) smtp.remote-ip=209.85.166.54; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1645291758; bh=9mRp6IH3iuzMmyQEPT0vvbthrZQJUKpL7zjD/YN7J3g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=LGhYfZaZI6pTZur/64Rr9U9xr9x9VyUk+UjVwMN041no7gm/09W4JV2Ed2K5LbjkJmnN3jkMy1 lGpLQ+q+4E/Ak3eg0ef3iY+an2kn+MPQxsxfhuaWuvKXIgAi1C+BdpGtHgb2ZUAEQUrXbI7lbM a702z2IJf0tDCdJH4itw8Dir/5/Dap0v49/d7kMVvP8LYuyawnnnCtRuMPE4G4bEsy9yzrW4l5 QDJws2jGh3APwQgPK9EF8Tm08FsUeDm+PyJRuQOsUOxo+If4Y5r3JVRJPvB/xpwosaj8lIUg+d ldnuWxjgz677cVP30aKf/VOQ/CiAzLmkqr4l3IHodpkBeQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=mKsMdhRyA1+Br2HKj1aY+sOkiRKxCzdtN0seOgPWSDM=; b=BQMsi3sNpVZUJOIToXQGxVhLNZ twoM0HhE0GKhVP51EevVzUWuP7ujwdzknsZ8YxVHQ/KIuZl9noeGQntKpMQXn9YcdnlkQ1d/iGs3R i25LuLg//1ssRxuA3hVIgjeKf5FU33++Aggkf4k+623bxQidU71W1W1QAKitYW1Z9NOLL7X73u73J 2iwYB/JooywmRiD/VLMwud/tw6F6/gai39Ng0wGiHMtlwPel0mb0/XJjYt4A6N/NjDmnNY5iuRkgL NlA6XmfPsncj1sLI7EcUuvCJAhxfwGF3CrNgBC0K+ijO4XfuZ+T0lRCJEAyOEonulTd1b3Jy8t4ou embu3xlg==; Received: from authenticated user by zero.zsh.org with local id 1nLTXo-0005td-7C; Sat, 19 Feb 2022 17:29:16 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f54.google.com) smtp.remote-ip=209.85.166.54; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f54.google.com ([209.85.166.54]:39737) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nLTWu-0005Ap-PT; Sat, 19 Feb 2022 17:28:21 +0000 Received: by mail-io1-f54.google.com with SMTP id c18so8767021ioc.6 for ; Sat, 19 Feb 2022 09:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mKsMdhRyA1+Br2HKj1aY+sOkiRKxCzdtN0seOgPWSDM=; b=mt4vfFf819f4qWPsyTcF1EFUZYOO44SWv0z8Bbf/ZGwNda10M9iuyo3DlT7MsejX3n oEe2Fa6i+tch+BjUF/UIQOJ7kdgq7AqCFJ22tChSBRmMyJUmed/3CieNHe9mJ7g35lJx YaHdedHQOVYQlfobX7yeU+NGI2nQB8LirvOdr8+wkRsTLYocMcWWVDgcCwVq9JoVwwD1 vYY0QML/FEHp0HhzXgaVzM1xpLWyhX2EVEcWYFSP/fM7B5aAKa5WnO5U/MMBESb+Cnif Ilp15f6zl9xyGqm0LhWTDz7UrQ+Nhqmk9sQYAdWcSkQxnMoBfZsICsvaj2knN2F3mMdW j51w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mKsMdhRyA1+Br2HKj1aY+sOkiRKxCzdtN0seOgPWSDM=; b=y3mfMh/jDx7J/7tq5MJCtYhtRKjoN733u4tI2P8re2+nIjNSNPxmv9MfosUYIYifpx 6++Ff2VDo8Orp9W7FJ0GL8t/Z1ESUnFnqVOGcdrxJ1eTp0C8z2UpIrxgLxAP3GSEBF5+ AzGi3UiKnHDMqh26KYKQ2or89gK7ebKCrRZ7kHRn6v8+3dPzmqbD/m1vgJ9RJj5252GH GH8vhkXWfbdIRtJLKeHegq3OzRoxLIeqQ8p8vMjwiBsQakelRVWdDLETDD/utEJgSE5k RpqWqQL0nCvA8l2lEqGIBxF1zkSCcK8rRb6Wv5WXlQ17FHDeyTTK6gEhO22uRcmpepqn E06Q== X-Gm-Message-State: AOAM531qjFEWPdynczX4Q3Nv8h44sLBGvVb5V//F5U11bAgNSypzHFN9 VRuZakQodfmVltcCYHT0Hg3ULO0Ci27WLufYvqAEOXDEu5w= X-Google-Smtp-Source: ABdhPJwNeTaRjYyeIvjPOyuFPlZBZoNQNYUETUCZ64H0CgOeUFAnLOyMcDo+yzNG0GehmV470PFuR5ghgE7+a8awIEw= X-Received: by 2002:a05:6602:15cf:b0:614:52d4:952 with SMTP id f15-20020a05660215cf00b0061452d40952mr9538512iow.185.1645291699349; Sat, 19 Feb 2022 09:28:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Sat, 19 Feb 2022 18:27:43 +0100 Message-ID: Subject: Re: completion inside vared To: Bart Schaefer Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="0000000000004aadd905d86253e4" X-Seq: 27526 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --0000000000004aadd905d86253e4 Content-Type: text/plain; charset="UTF-8" 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 > 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. > --0000000000004aadd905d86253e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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=C2=A0

vared -ehp $prompt tex= t

the history file gets emptied. I tried=C2=A0=
trap 'zle send-break' INT
but it doesn't c= hange the result

Is there something I can do to=C2= =A0exit from=C2=A0vared with a key combination (ctrl-d only works if the li= ne 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 scri= tto:
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.=C2=A0 A<= br> 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 =3D *_in_vared* ]] && reply=3Dno'

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.
--0000000000004aadd905d86253e4--