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 28610 invoked from network); 19 Mar 2021 22:24:51 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Mar 2021 22:24:51 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616192691; b=XIW+oZ/hveJJsFruUDmlB3NP8w8HxneKRZgrPTiyiTY8FIs8Cd2x7Fkq66947myGR+bBp8vKGP TRG1w4KCtLmfPeKHzfbT3cJRVg+sqEyn5sUq9qaR4wfcL01/Gbh0PCOrwUF0WhPxCOv8zR+4VT T3j9V2EsU2PI37R2VkHaF1TMKta51y6P94s5Pl5xkdDtkXVVKRi8UJVkPzpr2smv0WMYTzU42O 0PeMNbbN2Kh7jh+3ta10pYRhOj2CxB9/2F6LYzO9kJL7PKQ2ukLmK2UoF1n1E29WZC1fDEGqQ+ dGRyAf4fcwSCqJ1/9cGFXb/6AfVoZvwFyxTMQYM0vSssqg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; 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=1616192691; bh=bv51Ah58V1m1coUcF6EesRhofKnNVaUe5PmG2OMlGZ4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=OPS/DVqV2EhdPspyfBJCFp39JjHfAM7xHjSEim6EA+Au2nvtMbMPUGgRH/cBcsvdLYxXUVxr5t oFJPjNBKZhvJdM4sKqULEb/MuFWJFZl3zASN8AU+TmFxl1AL8eM3rK5QSTEm3ofjbUhvHYYvv8 IQpEZyIvi0pn4AINT5tHjBIiSOBqV8KdMJdNMZZX5SM7sHteEIGcXTYGO1N9oeOHFH8pBPhDpn 0OPp686iSgeRfBA6eeuT9PilY4QcZcH9BpSVR6DMs3r/v2s1G17l/iFwscBFT4jm5rWqV45pGE GNEs8nC9MgjeU6dCEw1AE8FERMxptaXBcdGA+tB+bMNxrA==; 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:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=1vgNLQsqaSEf7WSh4TomVMgLt2BE59O7AFwHoMFWP9g=; b=pjYN84akcRkffI17jgv19n0ZoN 53CD/B7SefWbhK6G2827JWw9ZvK25SSNRkJm/aPbi13Mo0FZHCRy5pauP5xHTt747hQFmC218vgUj ECNLe04AAqoTCSopqZT/amCO27l1moguYccAibnWCk1PWinPco5OliMryb3FV/iAzEFVVBAkgWA/V NvWpH+O7uD7JcaeGtrHBLK6k6iR3uL9KKZIqpNCbEB8YLLXSJSHC42hAHdUL7KKtYv0Jk2nNLwEnM fOL6ECfDH8brD6vESAJLGOjxsp88brSQnIjJEVsr2PmNbJutDGUipIevirACjBfoEHctN6Y4r3SNS 9ZJND5Hw==; Received: from authenticated user by zero.zsh.org with local id 1lNNXz-000Ayp-LO; Fri, 19 Mar 2021 22:24:47 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f181.google.com ([209.85.208.181]:44776) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lNNXi-000Aow-6q; Fri, 19 Mar 2021 22:24:30 +0000 Received: by mail-lj1-f181.google.com with SMTP id 16so13753330ljc.11 for ; Fri, 19 Mar 2021 15:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1vgNLQsqaSEf7WSh4TomVMgLt2BE59O7AFwHoMFWP9g=; b=pI26NQDl/BoZYixPYsvXECdf0bi4cej6AuM6JTb3gZoq7vWOYs5dHXGa7Xc8GJ8uI+ +HHHyie0Jkec7JAUjwJB0RpbVJ9vCPUD7h156YbOyR5+QGlSN1sefdgCleiKvc8v/BZ6 BPwm2JOwR6g/wjQdRhkGnCHR50cvk0nNaOO8biSfx+gSF8e+aFjlCm4wPhCY6Zw4SvRz ppaog64btbPAp3J4wwVk32O3YifGZfos9oFVqjHEa83AveJ/qtIQOWTNToAuQmHg0F2Z YFrb8Wq/wa4tJ55hN6pNf7uErjmvOfyyrIIDXIKRqudNyyyaQhVwuS5jTukdKExW8+5e bp/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1vgNLQsqaSEf7WSh4TomVMgLt2BE59O7AFwHoMFWP9g=; b=LkjWN1MqrVeIWuHYlicg5Ir+GzRqTomXzViAeM/GLS4Wh01wMBcWcM3+LVf0KrXZ/3 P4rptxuw4DQMrltZmX34iJY08/EsPg8yE//M8pahP+xjQxbLEyGIbokbtxVhGDKmn1Af lnzVrN0zL0xiLQmQs9YLL/+B1y20fQdtRMWu+Q+YUgMDVcbu0g90gxbUf4qt+MaXgqdM tvLDB6hGNS8lHcbmcHZx5FKRyA/sHXWuVPRxGfbksTgqWeuNv3/0IsfEFlEDN28rv0hs N1qhFL4sL81nhLIOkRttQU95rvyWQ6IWnejz1XhMU/B3nHDou3dkIGemsW5YzBksOuBj Iz8g== X-Gm-Message-State: AOAM531myEfv4zfkzPQbz/Wk/Tp2urr43nAUo4lFMWCa5ZNNUo1WGdB4 tk9JKZ25KxS2DkcW0USIVM1en3n1gyuORmMYHVDnP2HWyE/4Yg== X-Google-Smtp-Source: ABdhPJyxDq6FD9P1+Ejd0jV+GvAF/NpQQAhVoRSNQm68lDmQ7esrAWNctpihLihSD0E5MMGTpAdf031QhUYWCFGYkQQ= X-Received: by 2002:a2e:3016:: with SMTP id w22mr2247083ljw.354.1616192669248; Fri, 19 Mar 2021 15:24:29 -0700 (PDT) MIME-Version: 1.0 From: Marlon Richert Date: Sat, 20 Mar 2021 00:23:53 +0200 Message-ID: Subject: Proposal: Let compinit make standard widgets with _generic instead of _main_complete To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48194 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: How would you feel about changing compinit, so that it rebinds the standard widgets with `zle -C $_i_line .$_i_line _generic` instead of `zle -C $_i_line .$_i_line _main_complete`? (https://github.com/zsh-users/zsh/blob/f4a248f9d38dc02d65610395f4c7f9a95a5d6612/Completion/compinit#L558) This would make it easier for the end user to define, for example, different `menu` styles for different widgets. Without using `_generic`, the end user cannot out-of-the-box define different styles for different widgets. Here's the patch: diff --git Completion/compinit Completion/compinit index e81cd1604..212bc7cf3 100644 --- Completion/compinit +++ Completion/compinit @@ -555,9 +555,9 @@ fi for _i_line in complete-word delete-char-or-list expand-or-complete \ expand-or-complete-prefix list-choices menu-complete \ menu-expand-or-complete reverse-menu-complete; do - zle -C $_i_line .$_i_line _main_complete + zle -C $_i_line .$_i_line _generic done -zle -la menu-select && zle -C menu-select .menu-select _main_complete +zle -la menu-select && zle -C menu-select .menu-select _generic # If the default completer set includes _expand, and tab is bound # to expand-or-complete, rebind it to complete-word instead.