zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: "O. simplex" <ordinatio.simplex@protonmail.ch>,
	"zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Solution: Bu report - unix/_gpg completion broken
Date: Wed, 10 Jun 2020 13:44:59 +0000	[thread overview]
Message-ID: <20200610134459.514b0a3d@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <99116-1591744033.948885@zagI.gwnq.OfJE>

Oliver Kiddle wrote on Wed, 10 Jun 2020 01:07 +0200:
> On 6 Jun, Daniel Shahaf wrote:
> > --- a/Completion/compinit
> > @@ -159,6 +159,7 @@ _comp_options=(
> > +    NO_shfileexpansion  
> 
> Stuffing extra options into _comp_options is usually a bad idea because
> it prevents the completion system from honouring the user's preferences.
> In this case _expand will no longer handle the correct precedence of ~
> and brace expansion.

Oh, sorry.  I looked for such side effects before I made the change,
but didn't find any.  Should I revert that patch pending a better one?

In any case, I think the long term fix here isn't to expect completion
functions to be able to run under arbitrary syntax-modifying options —
especially given that some completion functions are maintained outside
our own tree by people not as familiar with the spectrum of syntax
variations as folks on this list — but to run completion functions
under a known set of options and make the user's options available to
them separately.  That's exactly what we would necessarily do if
completion functions didn't happen to be executed by the same
interpreter that will later executed $PREBUFFER$BUFFER.

z-sy-h has code for this.  It synthesizes an associative array akin to
$options, but it doesn't require zsh/parameter.

Cheers,

Daniel

P.S.  OT: Does anyone use a zsh build where the zsh/parameter module is
not available [i.e., where «zmodload zsh/parameter» would fail]?

> It looks to me like the shfileexpansion option has got broken more
> fundamentally at some point. Swap the = and : in the character
> class in the pattern on the line that produces an error and the error
> goes away. _complete_debug also appears to be broken with
> shfileexpansion:
> 
>   setopt shfileexpansion; : =(echo hi)
> 
> I've not bisected fully but I did check a very old zsh and it worked
> fine with that.
> 
> Oliver
> 


  reply	other threads:[~2020-06-10 13:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01  1:42 O. simplex
2020-05-15  5:21 ` Solution: " O. simplex
2020-05-15  8:53   ` Daniel Shahaf
     [not found]     ` <Ww4N4kk6TH_2Cp6_B0A709kTrD8LonXJPl6qmAAx75k0eQ7OczWUSwo7LCJOnXJm-nyuAVtdf8HOIGGb0krLeM0Z_fRWy723j1XTVA6vgek=@protonmail.ch>
2020-06-06  6:38       ` O. simplex
2020-06-06  8:19         ` Daniel Shahaf
2020-06-09 23:07           ` Oliver Kiddle
2020-06-10 13:44             ` Daniel Shahaf [this message]
2020-06-23 21:23               ` SH_FILE_EXPANSION broken with process substitution Oliver Kiddle
2020-06-24 10:28                 ` Peter Stephenson
2020-06-24 10:46                   ` Peter Stephenson

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=20200610134459.514b0a3d@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=okiddle@yahoo.co.uk \
    --cc=ordinatio.simplex@protonmail.ch \
    --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).