zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>,
	Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: Bug: cd auto-completion of .. fails with parentheses in directory name
Date: Fri, 28 Oct 2016 03:56:08 +0200	[thread overview]
Message-ID: <CAHYJk3QmMUr0_C0-aAMYCNsmeXuo14JzVXwuimBk05meeX88wA@mail.gmail.com> (raw)
In-Reply-To: <160922103042.ZM7407@torch.brasslantern.com>

On Thu, Sep 22, 2016 at 7:30 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Sep 22,  2:42pm, Daniel Shahaf wrote:
> }
> } 1) Is the lifetime correct?  I'm not sure whether elemnts of 'l' should
> } be malloc()ed or heap allocated.
>
> I think you have this correct -- completion is designed to put nearly
> all of its data in a private zsh heap that is discarded all at once
> when control returns to the line editor.  Only specific bits that persist
> across calls go into directly-malloc'd memory.
>
> } 2) Should quoting be added in bin_compfiles() or at a later point during
> } cf_pats()?  Although the docstring of cfp_test_exact() says the elements
> } of 'l' are filenames, they are then passed to ztat() which ignores
> } backslashes, so it's not clear to me what quoting is expected where.
>
> I think you have this in the right place, too, but I would be glad to
> have someone else confirm.  Or we can just put it in and see if any
> other examples break.

This patch breaks completion of
% mkdir '[a]'; touch '[a]/foo'
% ls \[a\]/<tab> # gives no results

for me. Reverting it on current master fixes it.

-- 
Mikael Magnusson


  reply	other threads:[~2016-10-28  2:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21  6:12 Georg Nebehay
2016-09-22 14:42 ` Daniel Shahaf
2016-09-22 17:30   ` Bart Schaefer
2016-10-28  1:56     ` Mikael Magnusson [this message]
2016-10-28 15:10       ` Daniel Shahaf
2016-10-29 18:06         ` Daniel Shahaf
2016-10-29 18:39           ` Peter Stephenson
2016-10-29 19:44             ` Bart Schaefer
2016-10-31  3:22             ` Daniel Shahaf
2016-11-27 15:17           ` Daniel Shahaf
2016-11-27 18:30             ` Mikael Magnusson
2016-11-27 18:32               ` Mikael Magnusson
2016-11-27 18:39                 ` Mikael Magnusson
2016-11-28 19:30                   ` 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=CAHYJk3QmMUr0_C0-aAMYCNsmeXuo14JzVXwuimBk05meeX88wA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --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).