zsh-workers
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] Weird _expand & _complete behavior for $parameters in "double quotes"
Date: Tue, 11 May 2021 20:32:14 +0300	[thread overview]
Message-ID: <CAHLkEDs=K73cB=YRoHW_0MY+Kv-hqMWAoB=za2Hxu+d36J_2kQ@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZvLbNQ+OoijxWVLjMAf84ZXWhgxKY8k35BRw4iz=i0bg@mail.gmail.com>

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

On Tue, May 11, 2021 at 2:05 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> I can't reproduce this on either Ubutu or MacOS, nor either with or
> without my completeinword patch from the other day.

I tried it again, but this time as follows:

make realclean
Util/preconfig
configure
make all TESTNUM=Y01 check

I still get the exact same test failure. macOS, commit
9e38ab81785c4ac755a7e78d2fe7a7db92bdf375.

Here's the test as a patch, in case it helps you reproduce it.

[-- Attachment #2: 0001-_expand-_complete-parameters-in-double-quotes.txt --]
[-- Type: text/plain, Size: 1179 bytes --]

From f5d77fe457da42de2bb23ba95476cc14466d19c0 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlon.richert@gmail.com>
Date: Tue, 11 May 2021 20:27:50 +0300
Subject: [PATCH] _expand & _complete $parameters in "double quotes"

---
 Test/Y01completion.ztst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index 2c6d25d9a..8034f0c67 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -282,6 +282,19 @@ F:regression test workers/31611
 >NO:{bar}
 >NO:{baz}
 
+  comptesteval "typeset -a bar=({$'\\0'..$'\\C-?'})"
+  comptesteval 'typeset -A bat=( "$bar[@]" )'
+  comptesteval 'typeset bay="$bar"'
+  comptesteval 'unsetopt listambiguous'
+  comptest $': "$ba"\C-B\t\t'
+0: complete parameter in double quotes
+>line: {: "$ba}{"}
+>DESCRIPTION:{parameter}
+>NO:{bar}
+>NO:{bat}
+>NO:{bay}
+>line: {: "$bar}{"}
+
   comptesteval '_tst() { local disp=( {a..z} ); compadd -ld disp $disp[@]; comppostfuncs=( _pst ) }'
   comptesteval '_pst() { local disp=( "<INSERT>$compstate[insert]</INSERT>" ); compadd -Qld disp $disp }'
   comptesteval "zstyle ':completion:*' menu select=long-list"
-- 
2.31.1


  reply	other threads:[~2021-05-11 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 10:24 Marlon Richert
2021-05-11 11:05 ` Bart Schaefer
2021-05-11 17:32   ` Marlon Richert [this message]
2021-05-11 19:40     ` Bart Schaefer
2021-05-12  6:43       ` Marlon Richert
2021-05-23 21:02     ` Lawrence Velázquez
2021-05-24 20:13       ` Bart Schaefer
2021-05-24 20:19         ` Daniel Shahaf

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='CAHLkEDs=K73cB=YRoHW_0MY+Kv-hqMWAoB=za2Hxu+d36J_2kQ@mail.gmail.com' \
    --to=marlon.richert@gmail.com \
    --cc=schaefer@brasslantern.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).