From: Marlon Richert <marlon.richert@gmail.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: "Lawrence Velázquez" <larryv@zsh.org>,
"Zsh hackers list" <zsh-workers@zsh.org>
Subject: Re: [PATCH] Make _expand_alias more usable as a completer
Date: Mon, 21 Jun 2021 01:24:01 +0300 [thread overview]
Message-ID: <CAHLkEDv5QTn_sPL7chv_YEbj3aGZ-hKJ5RbORyRaj4G=b91tpg@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3Sr1D2QJgT9pNduXLdpf8hBTsx558SVX+_QpSWkPN=9OA@mail.gmail.com>
On Mon, Jun 21, 2021 at 12:08 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On 6/20/21, Lawrence Velázquez <larryv@zsh.org> wrote:
> > On Thu, Jun 3, 2021, at 5:42 PM, Marlon Richert wrote:
> >> On Thu, Jun 3, 2021 at 2:24 AM Oliver Kiddle <opk@zsh.org> wrote:
> >>
> >> > I also wonder if this would be better done from within _command_names
> >> > 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.
next prev parent reply other threads:[~2021-06-20 22:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 21:59 Marlon Richert
2021-06-02 23:23 ` Oliver Kiddle
2021-06-03 21:42 ` Marlon Richert
2021-06-20 19:49 ` Lawrence Velázquez
2021-06-20 21:08 ` Mikael Magnusson
2021-06-20 22:24 ` Marlon Richert [this message]
2021-07-18 23:34 ` Lawrence Velázquez
2021-07-28 3:23 ` Bart Schaefer
2021-08-01 18:50 ` [PATCH] Make _expand handle aliases (was Re: [PATCH] Make _expand_alias more usable as a completer) Marlon Richert
2022-03-31 22:35 ` Lawrence Velázquez
2022-04-01 0:37 ` Bart Schaefer
2022-05-06 5:57 ` Marlon Richert
2022-05-07 20:39 ` Bart Schaefer
2022-05-11 7:32 ` Marlon Richert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHLkEDv5QTn_sPL7chv_YEbj3aGZ-hKJ5RbORyRaj4G=b91tpg@mail.gmail.com' \
--to=marlon.richert@gmail.com \
--cc=larryv@zsh.org \
--cc=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).