From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22895 invoked by alias); 28 Oct 2016 02:23:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39744 Received: (qmail 6936 invoked from network); 28 Oct 2016 02:23:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f174.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.174):SA:0(0.0/5.0):. Processed in 0.311075 secs); 28 Oct 2016 02:23:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.174 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l86298DiWn8kjtJMR7+CJ/LwFNmiDLSAxaPwOfJP0lk=; b=eNXh32vz58zsXjw4TbQP+VQt2EFp+n1T0UE+sgcu8hr67defREx2fbpBqdaYmL4Avd BFHXShEmyXoW5pgx+Ql/sGCYldlHRVNGlKdJxP/uXNFLUCZmMpZ9M7b22i658iUCJWfb xI9/nW00Ayq8KRMnNpDlJddnXDQJJZpamvbK3XFW0BdGvnCoqdMhAB8R+TEq3bU37kB0 yDjPrB3ZaEcufpZ6Z1N9JpSDH6w4vSnU4+f2TOCuC8U9AzZLfNbGDVqgyRi2FODsdRoJ qj9xE7+KiOQ1Baf57CLvjX95LngNE4ivkJq12ABmB8uxSG6lRF8DmKqG0i5YCsLjLr86 OqQA== X-Gm-Message-State: ABUngvf1kxDM9ks3LTFcxGBr0ORZy9D4+5YdDW12U2tR6rqp6vmVbTQxIlgjHBpSleOE6CxMoKsiJBQiF1kMqA== X-Received: by 10.237.43.7 with SMTP id p7mr8841165qtd.143.1477619769042; Thu, 27 Oct 2016 18:56:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160922103042.ZM7407@torch.brasslantern.com> References: <20160922144250.GA11076@fujitsu.shahaf.local2> <160922103042.ZM7407@torch.brasslantern.com> From: Mikael Magnusson Date: Fri, 28 Oct 2016 03:56:08 +0200 Message-ID: Subject: Re: Bug: cd auto-completion of .. fails with parentheses in directory name To: Bart Schaefer , Daniel Shahaf Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Thu, Sep 22, 2016 at 7:30 PM, Bart Schaefer 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\]/ # gives no results for me. Reverting it on current master fixes it. -- Mikael Magnusson