zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Marlon Richert <marlon.richert@gmail.com>
Cc: "Lawrence Velázquez" <larryv@zsh.org>,
	"Zsh hackers list" <zsh-workers@zsh.org>
Subject: Re: [PATCH] Make _expand handle aliases (was Re: [PATCH] Make _expand_alias more usable as a completer)
Date: Sat, 7 May 2022 13:39:01 -0700	[thread overview]
Message-ID: <CAH+w=7ZafdORwuCkk7+0det41vDbiu++TaNiS_fn3HkrOhKgAQ@mail.gmail.com> (raw)
In-Reply-To: <CAHLkEDteZ_CxinAuAym3Um+uE-MMDUEe-E0mErPKDwvDDNWPjA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

On Thu, May 5, 2022 at 10:58 PM Marlon Richert <marlon.richert@gmail.com>
wrote:

> On Fri, Apr 1, 2022 at 3:37 AM Bart Schaefer <schaefer@brasslantern.com>
> wrote:
> > Furthermore, the behavior is a bit odd.  With the patch, given an
> > alias named "xyz", and completer style _expand _complete, if you type
> > TAB after "xy" you get "xyz " (with trailing space).  Since TAB after
> > "xyz" yields the the value of the alias, the added space feels wrong;
>
> I don't like the way the space is added either, but it worked like
> that before, too.


But before it was arguably correct, because you're completing a command,
not performing an expansion; theoretically there's nothing left to do to
the word after it completes.


> I suppose it's better to be offered as part of
> completing aliases, but listed separately, after the actual alias
> completions.
>

This is tricky, because if you complete (rather than expand) to a value
that has multiple shell words, you can't enter normal menu completion --
the next TAB will find that the line has new words on it and start a new
completion in that context.  Which might be the behavior you want here, but
would definitely need to be a style setting.

[-- Attachment #2: Type: text/html, Size: 1827 bytes --]

  reply	other threads:[~2022-05-07 20:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 21:59 [PATCH] Make _expand_alias more usable as a completer 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
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 [this message]
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='CAH+w=7ZafdORwuCkk7+0det41vDbiu++TaNiS_fn3HkrOhKgAQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=larryv@zsh.org \
    --cc=marlon.richert@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).