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 17859 invoked from network); 20 Jun 2021 22:24:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Jun 2021 22:24:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1624227896; b=Wcw+yDtQGMnjILvdH3RSNJL6C+BsETrRLqlhTPavrtCkBTSd8KWshGgK2GrCWPUv/Qv++qRpjr l36B6mNmZPvWaBDnu5PtlGEEt7J9zWBHLVI0DWp6AWlSk8JlMDe3NsbsjS6M78aqSmYcytjOXg 4DHNYW1ZABzznMT57qCFzuB56L4ouiIaDS2V7FHiTR6wKm9uPX2Ceo5NdwUSWlMLuZzv9U1cAL 0jzC+QNSKyS8RRMyw/1FN6BCyCpkKoJH6EfeODNA8fp/7DED5K0PGjILawDR3+jzCANTyu7L6t yUafcIbOz5DHTgeJKaLw0VqWJZnSmK6HmgEmRLCWCliJsg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f174.google.com) smtp.remote-ip=209.85.208.174; 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=1624227896; bh=HF8mobsFv3K+mtPTyxQ2T8QrWw2p6nH+c/BTYTbbHJM=; 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:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=ZDH2fx6HELggNufs+XQ/G1xikVWHw/kS0N5knf741nK/P6RR1fNNe8b+kkdUQpOOMbhRpS1vDy dTHlW8GazQzqAoh9KpsI8KgHaZnawZq7PJ6eHIty1fgqThNS0+p8tyrS0CLGZkWZnxJJy8i9jM CcUmxaQhqcGFpwb8mroh5dKm+49jbkglvqP2FhpyGgdI6ay8WjLYzgRBf0cdQgb2pm15Y15DTZ 43/nJrBw1IpyVJrW2SS52jDGeq7TLbCcMsVTkO7r9Krc4yOenZ0D80Oebl8iOaBJfAkUbmnRza Tna+2lMLqGymfY2qPIxmDNfOWv0jq7FBQQrIAsziI5L3cw==; 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:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=HF8mobsFv3K+mtPTyxQ2T8QrWw2p6nH+c/BTYTbbHJM=; b=h23iP42NhGJuNTXX2ANDmiw8Xt n/O9V1GQYEnC3BBiLyzEACmfsZIRCLnWkSQsRyW4Lw66GQUnT46po4WHmVO4K4If2C7SZ9YfFitmb sLhs44yY9JFdlw6+TPDZj+DDdElh2gY7ae++NsentQ2MotSgr+tfXrTTh3nxOA3ZcqhA9D6pDGOfM A2xKYt5/gqLA/hWcmbFBXmdoDSJ9jxFG0jXc7S42XV22UKJ51BeYaUYUfc73nymp2BCcZuPszlV7I /wuJ6SV9Ie8N/q3pNukhcA2fTg4YAXWuUEBRW/OiBvcK0ZAXCQP3boxaByQsW2oMk03Y09PXYQsBy Ny6Gqfew==; Received: from authenticated user by zero.zsh.org with local id 1lv5s8-000Abr-Ct; Sun, 20 Jun 2021 22:24:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f174.google.com) smtp.remote-ip=209.85.208.174; 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-f174.google.com ([209.85.208.174]:34318) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lv5rr-000AI0-GK; Sun, 20 Jun 2021 22:24:40 +0000 Received: by mail-lj1-f174.google.com with SMTP id a21so17434908ljj.1; Sun, 20 Jun 2021 15:24:39 -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:content-transfer-encoding; bh=HF8mobsFv3K+mtPTyxQ2T8QrWw2p6nH+c/BTYTbbHJM=; b=qaP+Ig/oveonEbla7C7wvc7v0TKPa8X6n5EU9nQQtv/+xlcFtqrlWtx7MoZbYSKKAZ uhFF3QfgUPRgCX8dTJ4kjx5JoF+p4rLNptf0GyiC/6M9Yme3kC6YZhtQnCZiKjTB/sU7 /GYcNZkfbRGYLZu4YM3uolQ2DQ411D0TxmUiyAnwcgLQeOMFb4R8lYBRpfYWAeHyQafv PuYWbJ6Y/Fp+jDOlkbMlGXtXol1rZxi1R3z7WCwlFRsenO2qFcIV6HXjNdAK8gmJyV16 CSHhOO7dKwLl0RSdg+Wltoq0t967ct9GVmmcq2Di3tAqno8pWAU4W7tHdLea22TtKa18 0TfA== 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:content-transfer-encoding; bh=HF8mobsFv3K+mtPTyxQ2T8QrWw2p6nH+c/BTYTbbHJM=; b=uEmfDybYbRPml8/u1IADsHL2hJ/ob2K6kc62kngieXvvykpVB/qNO8LSE9QDkQS1I2 PsvyooBnV2tAs5Av4PfZ563MlzCPsLq5lhswZuKQf2DIzMaXH9ZgCg2H/icElvwV2Irs kNtbc/zA+4f2EKb6REoMUTs4fAUymAdK8LaA0zQCU1gIOrxiccgm0kebiomhsnzXcxh/ 6ssa20xNyiLtWxRF38SltOE60Ezoo74nRAkrJQf+XWG093Et9vYrtZKM68LgKpWRgfKe yE55scY3OKxo1fT0smlW9dRC6p4iW6wvFXbbGfJOAeZR7Rdz1uq0JJNmJV6/dP8aBGii zReg== X-Gm-Message-State: AOAM532lQFb5HaGqQhwntZsDEnDoFGELf4eTIuUUU/WQ9+mePYncQL1J LhkLtXZYWEgWgf5Bb+2yR2A6s+gAiupKknAENys= X-Google-Smtp-Source: ABdhPJzXZYKxsbZjSiTeUHozb4VuPJWzncuW6R7wTU16nRzjO61y96f4LW+PwSIk4N9KCJUPavyj04KW2g7vN3KzoO4= X-Received: by 2002:a2e:752:: with SMTP id i18mr3112543ljd.497.1624227878911; Sun, 20 Jun 2021 15:24:38 -0700 (PDT) MIME-Version: 1.0 References: <36227-1622676235.815398@zrY_.ZerV.zhJL> In-Reply-To: From: Marlon Richert Date: Mon, 21 Jun 2021 01:24:01 +0300 Message-ID: Subject: Re: [PATCH] Make _expand_alias more usable as a completer To: Mikael Magnusson Cc: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 49101 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 Mon, Jun 21, 2021 at 12:08 AM Mikael Magnusson wrote= : > > On 6/20/21, Lawrence Vel=C3=A1zquez wrote: > > On Thu, Jun 3, 2021, at 5:42 PM, Marlon Richert wrote: > >> On Thu, Jun 3, 2021 at 2:24 AM Oliver Kiddle wrote: > >> > >> > I also wonder if this would be better done from within _command_name= s > >> > directly but I'm not sure. > >> > >> Actually, I feel like it could instead be added to the _expand > >> completer. Would that be a better idea than what I presented in this > >> patch? > > > > Anyone have answers to Marlon's questions? > > If it helps, I disagree with conflating _expand_alias (expanding > aliases) and _expand (filename expansion). _expand already handles a lot more than just "filename expansion" (which it actually does not handle at all). A quick test going through all forms of expansion listed at https://zsh.sourceforge.io/Doc/Release/Expansion.html shows that _expand currently handles all of the following: * parameter expansion * command substitution * arithmetic expansion * brace expansion * filename generation (but not history expansion, alias expansion, process substitution or filename expansion). Since alias expansion is in fact listed at https://zsh.sourceforge.io/Doc/Release/Expansion.html, I don't think it would be too weird to add it to the _expand completer.