Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _ps1234, _date_formats: Complete strftime formats for %D{}



On Thu, Jul 9, 2015 at 2:17 PM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> This patch also fixes and improves other things like the positioning of
> numeric arguments for ternary expressions.

PS1='%(<tab> no longer tells me "--- number", how is this an
improvement? It now completes delimiters after PS1='%(3<tab> which I
would also not consider an improvement :).

There doesn't seem to be a way to get back to completing anything
after print -P %D\\\{ (pressing tab at this point just deletes two
backslashes for me, and typing more things does nothing). It's
probably not a common thing to do though, so if it's complicated then
don't worry about it on my account.

if [[ -z $compstate[quote] ]]; then
  bs='\' # in patterns we use (\\|) widely as print -P handles backslashes first
fi

I find the placement of this comment a bit odd, $bs is about
accepting/putting a backslash in places where the parser wants, not
any backslashes that print ever sees.

Let's hope nobody ever tries to use print -rP.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author