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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9391 invoked from network); 28 Jul 2021 10:29:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Jul 2021 10:29:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1627468185; b=QF96YsuXa+xYyghZZ0Z5bHcE6x8fL/M0Lx/XZJWyk6R25FKvqiLvLHTSIVSqi2a6sVQhArr9rR 2js6gQ9wsUOdJCDlEAvArU5gxeac+CCZ+EULo2YKO5YJ9tiDQCM9g1XKi5kntKCEG1CKY8SbEj zIihdMtSqGGyhdOBJyRxYaXT5jSZriSDpXxe4P9/DR8K2LsLSV+ZUfV/NpgceYVF8LXqeKQ8zD XJFcIorMK9th6xcxVMrQUdXKbREWJs1ppnpCYeg8R57Fgd6B99MUt0aTcKAkV4YeeZNHa09OLl 5cS8JbS5YwW9FzJ4+EwMXpoMaZ6mmZLUPvBuYVdj51CZiQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vs1-f54.google.com) smtp.remote-ip=209.85.217.54; dkim=pass header.d=gmail.com header.s=20161025 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-20200801; t=1627468185; bh=0TG5xJLDSyDgtYbDX6LZqYt4kToyLW2Pl/LkNsiqWRU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:References:In-Reply-To:MIME-Version:DKIM-Signature: DKIM-Signature; b=zHROfMNHm+Vm7dYk859Sb7/TPlW3A0o8HYeM7UhN0I4u1m9bA+Dswz1ssH2pWrmW7uLPLcmCpV C4gwXi9rsFdJNsRCCFSE8rSAkqrTGVTbj6N6uMIBdIWdsyr7j7mYvewrA3hIc6tIfxlwVjZQ2n x++u2fPY8pVAOLta3CrKJiDTc2LBw41emtDjI40jvO5TuYOZyPDAJ08F5QgM2bdscrCdIX3qua jTP67gMKJFpQViXeAUplqf3LE2VsITqVGR9VGfeQlc8naH9oWIio0SZFgzxy5i0B9G0e8QV01O uxTAljtdfYf1hI5atF16HqZU3ZbFmkgClYnVOZvDI/biYw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=uC8vpAjQsztKMODaB6Uf1FDm1eE8/hJLz0hRELJBXR4=; b=HrNqMHt1ViQpJQuunJInBkNMGR 7OQRY2LYP4CVhiOuh0FaxHBNvJsRmtm0nWHs1hyEAU+F2uRdynHaLoN0dQjtD+3AI407szqTSCcV3 gmYPYrb5+j9FQ1c/gKIfFkeCHKqefNXWo5qyzG5SU6lj9X0GcyeKJ/dIp2ScAVpu24NIpWJ+b0oiu zTU4dxIlW29LhyL1ylxjml4xGfodUDCFdfGWZS+KtCAhXJVDNPicc+xPpmwhzl2eW2woBuSe6Rr5n FHFXURSGJKy6Qn5gi/xuSevMzhHxOF/A8DQCrs5o51FWrBb9CJF6Jg2P8xQCPi+weJiXIpXF1od8X so03krFg==; Received: from authenticated user by zero.zsh.org with local id 1m8goq-0002Mz-CD; Wed, 28 Jul 2021 10:29:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vs1-f54.google.com) smtp.remote-ip=209.85.217.54; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vs1-f54.google.com ([209.85.217.54]:38743) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1m8goX-00025w-Ol; Wed, 28 Jul 2021 10:29:26 +0000 Received: by mail-vs1-f54.google.com with SMTP id x21so1120491vsx.5 for ; Wed, 28 Jul 2021 03:29:25 -0700 (PDT) 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=uC8vpAjQsztKMODaB6Uf1FDm1eE8/hJLz0hRELJBXR4=; b=ECdtN/UKPKgAmYMCPZ22AZq8zYNpu6S5DAvdxA+T2j7CmfxeBJ662Rd2T2pGijZB4+ iimBop1ufLcFlfkw4xadmkCP+4f88zJZJ6vGxdt9xlbAbuV5FW/c6JlFkQUFwqbpy1s3 D++aInzhlQ4zqjNSU0OuzsYAq3Hymxsj1kbSgDMIfLVqkuGEKutUsQdBT4F3UnW5+agK ahfXM4XwgNSV94eeHlX2u8+al9Gpn0tpEU/t796/islz5FlCl89geWRNt9sXY97Txjfn xGZP9KNy29OWOvFtUxH27kigI8VCvCvLhS7RfBoqoAMKqEFQy/7JhBcTauWJSvdqmsma wwag== 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=uC8vpAjQsztKMODaB6Uf1FDm1eE8/hJLz0hRELJBXR4=; b=s74GdLNOy9eKZDuicyt+jRQu5jaj5DLRUZtgMVHPrGC76QuFc2rIpceWI0k5osv82Z LKyc6f1/MldhXu2V0iEc1JlRF06rJln4ZQHFVpIafdYmN1Pe//toizJ0ARow8AJnt1uU 656KWPiz4lK8BRIGiWaY+BgkjMev84lM9SgW0LXLywaTIZQrBs8tvhIzE6G2ezMnZ5zf 1UQKlA0rmGT+8PEKaaBKR3ywNXFIKiQQYITcWlx8j1pKZwgq9UzNENxRqYWB/xRhtT+8 RVfyiXyJOD6OBsFe7K5XpaPwCvWRs+mG1Kc5wb96VMpe4DMsSos6L6F36oZMLUFtmBAX c5AQ== X-Gm-Message-State: AOAM531MJoSKJYkFri2A6pU2Z+4hzGms5oLOFsfsbRebLxE1Tcqz1dw4 EJHwDAONSpileEJkCQ5lK8zDDqFzdrQ4mq6hLwA= X-Google-Smtp-Source: ABdhPJwjB73az5akJkz2QvMPnnv0QqMPw+9Pg16MfsPduxgBJNIMAhUGQe5TR8pvLW6BzSUeTHUw7VEoV3KLrzWBLmM= X-Received: by 2002:a67:ee87:: with SMTP id n7mr21029240vsp.29.1627468164386; Wed, 28 Jul 2021 03:29:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:1508:0:0:0:0:0 with HTTP; Wed, 28 Jul 2021 03:29:23 -0700 (PDT) In-Reply-To: <2DB7CAE3-29F6-41C2-95CE-687CD5E6BA92@kba.biglobe.ne.jp> References: <8FC07840-27C0-48AD-A8AF-120924B44491@kba.biglobe.ne.jp> <2DB7CAE3-29F6-41C2-95CE-687CD5E6BA92@kba.biglobe.ne.jp> From: Mikael Magnusson Date: Wed, 28 Jul 2021 12:29:23 +0200 Message-ID: Subject: Re: [BUG] _gnu_generic completer produces broken output To: Jun T Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 49210 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 7/28/21, Jun T wrote: >> 2021/07/27 12:57, Jun T wrote: >> >> The case in workers/48091 is more obscure for me: >> >>> autoload -Uz compinit; compinit >>> zstyle ':completion:*:functions' ignored-patterns >>> '[[:punct:]]*[[:alnum:]]*' >>> zstyle ':completion:*:options' matcher 'b:-=3D+' >> >> First _main_complete:218 calls _complete, but it fails (returns 1); why? > > It fails because _functions (the last command run in _typeset) fails, > and _functions fails because there is no functions whose name starts with > '-'. > Not calling _functions when completing options (as in my previous patch) > solves the problem, but I think it would be better to correctly set the > return value of _typeset as in the patch below. > > If return value is correctly set, the previous patch > > - else > + elif [[ $PREFIX !=3D [-+]* ]]; then > > is not necessary, but I kept it because calling _functions when completin= g > options is just a waste of time (I assume no one would create a function > whose > name starts with '-' or '+'). You are (unfortunately) wrong about that: % grep ' [+-][-a-zA-Z_]* *()' \#zsh.log 15:11 kind of esc, I've done this http://pastebin.com/TeuTQfmk and by added the misc %m in the formats, I'm now seeing the stuff given by +vi-git-st() 00:17 If I encounter a function like "function +foo() { .... }", what does the + mean? Or does it have no meaning at all? 00:18 as in: function +foo() 08:31 because i don't want to overwrite the -init(), but i also apparently don't want the zle -K within -keymap-select 08:37 +vi-tone-down-master() { hook_com[branch]=3D${hook_com[branch]/#%master/=EF=AC=86} } 08:44 +vi-check-untracked() { 22:04 I'd probably build functions such as +zlogin_red() and then unfunction the whole +zlogin_* namespace. 02:55 +vi-git-untracked() { bla } 23:32 > +foo() { echo hello }; +foo 16:11 -() { print huhu } 16:11 > -() { print huhu }; -; which - 16:11 > -() { print huhu }; which - 16:12 > -() { print huhu }; which - - 16:12 ccxCZ: - () { 15:01 So /lastlog -regexp () # crashes irssi. This is not a good way to find examples of function declarations. 07:25 > -foo() echo hi; -foo 22:53 or rather -strlen(), as r should be raw bytes 15:09 +vi-check-untracked() { 15:11 >> +lol() { echo lol }; +lol 15:43 +vi-check-upstream() { 22:13 > ls -l () hi; which - -l 22:13 Mikachu: -l () { 00:21 random question again. So why does it complain about bad option when I do "alias -=3D'cd -'", but when I do -(){builtin cd -}, it allows me to declare that? I do find the function declaration workaround handy, but I was wondering if there was anything I'd need to be aware of when doing that. 10:18 and +vi-shorten-hash() changes the contents of $hook_com[appli= ed] 10:30 should work. +vi-applied-string() { hook_com[applied-string]=3D"${${1%% *}[1,12]} ${1#* }"; ret=3D1 } 20:17 > -ke-bab-() { print $ZSH_VERSION }; -ke-bab- 06:37 how do you trigger +() then as ksh glob? 04:29 zstyle ':vcs_info:git*+set-message:*' hooks yourfunc; +vi-yourfunc() { get the info } 13:15 how can I make this seq 2 | xargs -l () {printf '%s %s' "$1" "xxx\n";} 16:03 replicant: +vi-add-space() { hook_com[branch]+=3D${hook_com[branch]:+ } } 03:05 I wonder what is the diff regex that tells it to choose builtin source ${ZPLGM[BIN_DIR]}"/zplugin-side.zsh" over -zplg-download-snippet() as the function name to display after the @@ ... @@ 03:08 or @ zplugin.zsh:1207 @ builtin setopt noaliases over @ ... @ -zplg-load-snippet() { Isn't this ridiculous? --=20 Mikael Magnusson