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 7396 invoked from network); 28 Mar 2021 18:07:46 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Mar 2021 18:07:46 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616954866; b=G8RXPoiG96lwfL+RDiW/oyNnJMmMULJ52iOR09T7tWIXRduHNeExn/cnXF92GC10IlkvUmVJBs LfaLX42iET2kFdFG6RDZwHHCXvCbrpcnpb8NSI/3zmVzQMxlJuuNWe7u1lTTUMkuXBb7JEcYR1 vi4pRmsM1llUmMGNzMNeJ7+BEVTYYuaFDEDlXWPEyyQKdNtrXrnVVNTfA2bHBW+3VYGd+Vv3VQ NvaFEqicmulnlrgZQWoFwtG7GN9+POPGMJ8dyHqSssj61MtKmpgMG8qMHb7agXmXbugN+EWL9U hOuIGvvc5Z0cQBwcnkh8uPR1lCVMpaOZxdB1v32HDYFzcw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f41.google.com) smtp.remote-ip=209.85.167.41; 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=1616954866; bh=3cfRzM7oWdaKXuSG6pcKCacQaXrGe4gOZdDSBHzWrDA=; 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=0Vawm4BWEq+MzsWWy8nzTAj7CjxgMcHPw88XQ0ojB4QYwCqMy+C3Rbw8tSQjjXWY2mjzwA5LSa 6akg9+wVENW97ZE8tWjE3LOipeWomSKLCQJGKaYUmxaBxflk+q+8xGChs5hH2Zh8aekVz2dsW7 9VtQD5XF9gkss+LeN6YkVlFDYCzgLCgvRx3ImSIPbSpAcYnPbQ7N9C28LrwdANdKxngV0vAinm M192HUitJsJ4KXW2pyQM6RvOCs7vxX6myfCZCx3HnJMIvxqI+MAF6PJQxTj2m9A5oWSz6Xs2Pl VKxW2q2bRJss0/WW5TSUVo8jd772aQYVRtVQ6aS0b7akgA==; 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-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=5bnd0iPml9i+u68kVyIAaWwL+GgKGEMNEOHNoVqH/lE=; b=VoeZbSUbxwC2d9xyI+itrN1R5T sOrwmOMA4RUTutPUD46qeAebSDf4QWNz1IwFQv+ydOVMUSwwLoXXbgAV+IMMIhRJapA3zc5m2YkNy +914M5/ZZuWUSFmlb1P7cNOBOYHi+evmX72jXUdZRAQmCISi7ajvyd9adgEyTE0K3oIfSJ9m1JOLN 4vnYyUrBGWQ5Bd2wrMqaCR1FPbVdFuSuNi7zkmDoI9zZ9O/5NYHqh1MEuXHMI2Td+08H8Dv8sZd1A PC1P8pDA+7e23juot+Z7c8RhKfzdUrCuqf//GiCQ37MmwCxrwstVmDmLcZias/UMub3T7QY4ymFih ongjU9hA==; Received: from authenticated user by zero.zsh.org with local id 1lQZpB-000HuF-SG; Sun, 28 Mar 2021 18:07:45 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f41.google.com) smtp.remote-ip=209.85.167.41; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f41.google.com ([209.85.167.41]:42749) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lQZow-000Hlc-Fn; Sun, 28 Mar 2021 18:07:30 +0000 Received: by mail-lf1-f41.google.com with SMTP id o10so14998705lfb.9 for ; Sun, 28 Mar 2021 11:07:30 -0700 (PDT) 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=5bnd0iPml9i+u68kVyIAaWwL+GgKGEMNEOHNoVqH/lE=; b=ttgmBs7eijhGIbI+ZX4WXa4Ff2VcU67S3oi/4V7M6vP19+TJigPJgbDcI/rGsa5TOg rbRIqenEdN3xdua1GspF4nTGLfw5ir/wxhxKC9e68x/hpyXef7Wi0WUaMqmLUvOzr1i/ Us8Fw0CQbDTLqDHssz4/0vEroy4XRz/Q8hcK31VEDkNu5f8+ZOSgMwi5X852/OrhBWLL pVKB49hHHCftjVfDjVfyVSxVe77Wc2kD+MkAPQT3NnmqrJXo05rgGOFUyGpcZ1ZiHW+0 FhcrAkju0JZIHMgYnsg5tTc8A3F8yN7hxvyW/OwkUlyQxOQwEt3HNLs2qPoqqobSc1Li 7v2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5bnd0iPml9i+u68kVyIAaWwL+GgKGEMNEOHNoVqH/lE=; b=N778fNRxnix6qghD65Qp4nVVYcnZuL3zhHYJsgvSV8zba/vypwZWs0vmcjw+OT+P3C uqo3Ae2wZ/6m67qVMFg4a+sThtlQkzuVxKtS4bF+g6qvBayTAfnhB2RhdzACay9mml77 9IOO4I4q9adbyVKW+NKPv8Efx72Lo6y8JhVzu2X9LuvcDkoTuA18mCdC2lh0NI0nAnVq hxKJh+jcNcx8RKDXGuQbS0B2HFWLQp7PQcm8GNc3Xbo9GWt1WjZmVioLO5BoSjOkSpcl 0p6qY1FTrXm/OkBtNhuV3IU1Cn5Q7MZUOebgUijX/jgXi9YDdkuvXLs7YVl4oaVQzYIs 5DKg== X-Gm-Message-State: AOAM530mFNczVBOwFZGpdOpNfOVIO0qIfibUAlFwoQxvk9+3f+XhGKUM dcMwgKg4PC5CKJUAyG+FY+XHUY5EJPsA8KbXKRRjCMVERDHKkQ== X-Google-Smtp-Source: ABdhPJw/7L9FTsjVPD/2qJGdfZMAecQhmswMAziidgjuaSKOZGxYDz38QZCNHrlpevXy22t6U+PUkG/iEFKUdki7wXs= X-Received: by 2002:ac2:51ac:: with SMTP id f12mr13692545lfk.605.1616954849891; Sun, 28 Mar 2021 11:07:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marlon Richert Date: Sun, 28 Mar 2021 21:06:53 +0300 Message-ID: Subject: Re: Why does _main_complete not try the next completer when $_comp_mesg is non-zero? To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48291 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: Archived-At: On Sun, Mar 28, 2021 at 8:47 PM Bart Schaefer wrote: > On Sun, Mar 28, 2021 at 9:34 AM Marlon Richert wrote: > > Why? What is the reason for this? > > _message is intended to be called as a last resort when the completion > function believes it is impossible to generate matches. > > (FWIW, I think this behavior pre-dates the ability to complete words > from history, which obviously means it's never literally impossible to > generate something.) Would there be any drawback to removing this check? A completer can already return 0 to prevent further completers from being called. This seems like unnecessary special-casing to me. Correct me if I'm wrong. > > And is there a convenient way to work around this behavior? > > What does "convenient" mean here? More convenient than just invoking > a binding for history-complete when you see the message, so that the > _grep completion is bypassed? Convenient would be that I could specify through a zstyle that I don't want that behavior. Though, why anyone would actually want the current behavior is unclear to me. > You might be able to do something by specifying a different completion > for the tag :completion::complete:grep:argument-1: _grep was just an example. I'm looking for a more general-purpose solution.