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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5034 invoked from network); 28 Mar 2021 17:47:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Mar 2021 17:47:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616953641; b=zHzxPds7TzxAyix1a69ZzhA0l8w8osBPJRZ3nXnZp18mM+4PVd3rO1YHirwk6AkEj7581CGIYx xQnjIb3TrCXPSGxBCFkcR7tbmXSNkD5cjzcc/1LqYe82Ee3VInxvwYF+kUWOtWYzqRfx5KZ+ky eBwWl7dnNRiIB+IQP66mngOYL4agDK3VrRFTyWF2UHN6EujIYlhtjeWLSbEZ8k8lZNo5E10FwB tx4QpgYG4ZBbvy1IwQiQJ6QEqEY4AoG0zGl3O1smrl/3D31MQJe23Z5Yb9hPfEZPpepAHY+fZT /hQG0FNggUmm5JfaLJcKFN7d3tqXfiywikjCVP0/qUrniA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1616953641; bh=ZZf1janX946eW17ArD/X0nDcgH5B5UUBHqwWtozyuzU=; 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=1jZC8B8O2KGJ2bvylEu8NglaQc7i44LLV33rg3miUJ6b7Or4rOD4q+cPcnklIubQh0CVEzDWHg dQ29Q+kuKhTdj/mFIXESGI7krriH8JoMzJCX1gQKkqvIFJ0vHRLrPHysIzfRcRgP+deuMNuwIn /wpz6YtJVcq8VL6ZaEOrAbQ/CE+Y71Sajrp/Ct8f19FPmhCyZf05tvPnYJuiv2bzpmZuEU9+oE A4dPG0DazH3FGIttZjDRBtOIcH1cLu3ehawqlHrt74ILzUssGC/v6UaKf4pBOjXCV18wPeyBmh Dp9cLV+pMGxpRPqJki0hwSXiK6+up2QRpnu2SB5CDal4+A==; 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=bmPyF5dTcCYv5hO/+4SifLaH2OvSJqBOszCJi7IJulw=; b=BBQG9BVZsmwcaYaKi1iHuURxSZ jL1XQjbxdBU9NhvbfdSl91hI9dEi5hBPMp3mF+elfUkuM6+uU7w8I18+LhMzE3bz4WpzFfNBYDqqa hYFpFVDNjUg3qiQX2XDUPaKQdpObPrflmUZMaxb+xuuHULqyo5H2gb44lO2/qY5DnINOBL5i1IObq 2JCb3uzrQVAM7CsKXQps4uTkkb7o1Qil76vGvtn7lcCS175h+0LEqUEqE0YhWqE2sV5VZTpQeXgVP CmaMsdPr0In7AIBy7nWpSwylKdDyFZ6LKUcoc2ZUlHUTWDjy+sNlXKp0pEzWksFukM/evx6+K9rFW Bko01cfQ==; Received: from authenticated user by zero.zsh.org with local id 1lQZVQ-000HCH-OI; Sun, 28 Mar 2021 17:47:20 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f180.google.com ([209.85.167.180]:42748) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lQZV8-000H2d-D0; Sun, 28 Mar 2021 17:47:03 +0000 Received: by mail-oi1-f180.google.com with SMTP id n140so10991963oig.9 for ; Sun, 28 Mar 2021 10:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bmPyF5dTcCYv5hO/+4SifLaH2OvSJqBOszCJi7IJulw=; b=QooeCeHbyJrxCWdFkDrRYLUk31eD2NkufeYJNLXlEJNf15YzU+gjypXiesYUEZQdRD lOfrNH31smN2xkD3mNYSTmU52x0uZB064+bOQWpbhS//S5QjODz+G22Vk1/8aJN2ormK uwRjXQbYRmyHb8J98s9+e/EZETr/jqJebei/KCkFImGD5LcTP0tyoaeXM5ahxVJXHd4z 9n6I7oqBNygoH0RnKwFlrIxUkgEGkgwZDa73RxDtO2OJC/2bEyg2hS+ywcwr5YA+wYvo azGfE/CgnSphCkEmWoqmkKyymiaqWevvT/aHt+7XpfOG0Bp/bLtUC9rGgQh0RUkITfcm UQvw== 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=bmPyF5dTcCYv5hO/+4SifLaH2OvSJqBOszCJi7IJulw=; b=gsEEbUXY3c/9H5SFRNnv9iDiEzWE5BZbYvZ8eJbBrxCFYw2lR87pCs9gtnOWhBoyG7 O4gm+vRuzItX46q/PZTwCwu1OKqPW+EQ1NZ4LIzbdxQtu8AYyEks3UXCLALQjMiejdrf NfTTMp1YY6uOmmDNolV7nPGvQm/hQcSGRIQQvsPgRr58pqI0/YD92U3lIudJ6XeaEBts uuh8lCE9xj1PfiJ4cGPbd04M8MDW3VJvOLVsfoAHVnTaDzapDYH/Ls0a4UrmrwmBjenV v8x395KVT8TsoW+7w91ChPlrRVTpAw+kCmK/lJdM4YXtCunBfnPsL7Iqb/jvTS1pMjkg 6gDw== X-Gm-Message-State: AOAM5316HpCWKR1lH46l9Cps4nUecbYPBgWSuwR76TsIWO8jotweEIdi 0v1dCPAfcr4L3q/aS+LGwTXDPXLqDlGeuNkQe2Xmog== X-Google-Smtp-Source: ABdhPJyEVQj+kMSQgJBFxljOmdSQwxKPOe0ZH8lT7KPVDCk4yXqRyXjmxo3+ksL2opJN2svYItQXE8KdBUhnN69VyeM= X-Received: by 2002:aca:4d8f:: with SMTP id a137mr16123642oib.132.1616953621185; Sun, 28 Mar 2021 10:47:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 28 Mar 2021 10:46:49 -0700 Message-ID: Subject: Re: Why does _main_complete not try the next completer when $_comp_mesg is non-zero? To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48290 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 9:34 AM Marlon Richert wrote: > > The following line in _main_complete > > [[ -n "$_comp_mesg" ]] && break > > has the effect that, whenever _message has been called (with only few > exceptions), the next completer won't be tried, _even when > $compstate[nmatches] is zero._ This is documented, though not precisely accurately: ... Note that if there are no matches at the time this function is called, compstate[insert] is cleared, so additional matches generated later are not inserted on the command line. > 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.) > 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? You might be able to do something by specifying a different completion for the tag :completion::complete:grep:argument-1: