Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: cd auto-completion of .. fails with parentheses in directory name
- X-seq: zsh-workers 39744
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Bug: cd auto-completion of .. fails with parentheses in directory name
- Date: Fri, 28 Oct 2016 03:56:08 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l86298DiWn8kjtJMR7+CJ/LwFNmiDLSAxaPwOfJP0lk=; b=gvniwlyBL54aoHJQFknCdD+cNZXnsvpyT13ov9if4Yh0OvTaw1R/PcC8zA2uAA1Cda ZeB5JIXK8NyMVcAP+9xoxhxTEaCXdqKQB4Zf4TtuHo51LzreTG1aXFQjwgEk0T7o96Qh m1j+b3/ZcbPbCBfmD9G5/JJ6s7WanjvCuoKffeniBFJlL2I6qPwgfCs13203gvxY3cfx hkMQyac6ny5D+3w5Pd/nbBjJxbiPjr4c0mNgs7iJ/Db0PZ649ef1DNpsEfBNEE/qgQCf XW1BeVtLyJGVKJnF0sTZeRg5MLv8Qn1wtVAjJVi6D9uJZfYnHPwsoErRUDIcvvqSiArz Tv/w==
- In-reply-to: <160922103042.ZM7407@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAPnWG_TR7DC7h36m-jp6PnuY=M4ViwwWNMtaT9aU4wawygzoBg@mail.gmail.com> <20160922144250.GA11076@fujitsu.shahaf.local2> <160922103042.ZM7407@torch.brasslantern.com>
On Thu, Sep 22, 2016 at 7:30 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author