zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: PATCH: Move _history_modifiers call to _parameter
Date: Thu, 14 Sep 2023 23:05:48 -0500	[thread overview]
Message-ID: <CAKc7PVCmFL380WXxuoyUfU1aSt8OgappjV1aJ9MnewaFea8QqA@mail.gmail.com> (raw)
In-Reply-To: <20230914121002.10274-1-mikachu@gmail.com>

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

I created a mew function with your patch applied. Advice on changing from
_pa…terrs to the new function, when at: $ ::<TAB>?

On Thu, 14 Sept 2023 at 07:10, Mikael Magnusson <mikachu@gmail.com> wrote:

> _parameters is used in many contexts, like assignments in command
> position, assignment after typeset, etc, where history modifiers are not
> valid. _brace_parameter already calls _history_modifiers explicitly so
> this seems more in line with that.
> ---
>  Completion/Zsh/Context/_parameter | 5 +++++
>  Completion/Zsh/Type/_parameters   | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Completion/Zsh/Context/_parameter
> b/Completion/Zsh/Context/_parameter
> index 7e7788535c..b08d665f58 100644
> --- a/Completion/Zsh/Context/_parameter
> +++ b/Completion/Zsh/Context/_parameter
> @@ -1,3 +1,8 @@
>  #compdef -parameter-
>
> +if compset -P '*:'; then
> +  _history_modifiers p
> +  return
> +fi
> +
>  _parameters -e
> diff --git a/Completion/Zsh/Type/_parameters
> b/Completion/Zsh/Type/_parameters
> index 7f6f33e0ee..7b7692a3c7 100644
> --- a/Completion/Zsh/Type/_parameters
> +++ b/Completion/Zsh/Type/_parameters
> @@ -6,11 +6,6 @@
>  # If you specify a -g option with a pattern, the pattern will be used to
>  # restrict the type of parameters matched.
>
> -if compset -P '*:'; then
> -  _history_modifiers p
> -  return
> -fi
> -
>  local i pfilt
>  local -i nm=$compstate[nmatches]
>  local -a expl pattern=( -g \* ) normal described verbose faked fakes tmp
> --
> 2.38.1
>
>
>

-- 
Best regards,
Sebastian Gniazdowski

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

  reply	other threads:[~2023-09-14 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 12:10 Mikael Magnusson
2023-09-15  4:05 ` Sebastian Gniazdowski [this message]
2023-09-14 23:39   ` Bart Schaefer

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=CAKc7PVCmFL380WXxuoyUfU1aSt8OgappjV1aJ9MnewaFea8QqA@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --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).