From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26825 invoked by alias); 22 Sep 2016 17:30:46 -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: 39416 Received: (qmail 28864 invoked from network); 22 Sep 2016 17:30:46 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f54.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.220.54):SA:0(0.0/5.0):. Processed in 0.131713 secs); 22 Sep 2016 17:30:46 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=fl05Tq8QIA5oE/XCUL1ew4oYQysn1qmJs12aH+BhUHE=; b=F74PbzUoVJvv652+d3JPChBlwlyhK3PdMa6prqQF2FMUm306tC1NtyTCI8+yMVhDlV PxwInOOays20nta7tJx+f52kIXdHXpwjQryhgjIdQu1FUd8zmWTAEjjPvDdVZ4+63ulb hfCEvAkJYCFo2Hd+705jnBcPwPTs/gUZjqTjXd5/9+JV5ZRKf+JXx5R57HOO4Ss23ILU 1CZzODBNNpUYzZ1QeOjypWi9D8IH8WF8Is21O8Nj2UTooaJ188sNzVwjNNsCKHbGPWGg TU6MLklMqi18WKu0KXQYmsJAWJLEzaySM0dJCcsVLnGyOZtLpQK1GqDwYJa9eGwq4O2G IHog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=fl05Tq8QIA5oE/XCUL1ew4oYQysn1qmJs12aH+BhUHE=; b=ErQ387ufpq929ll/MVX2ne9YdBaD1KE7iNjr4M9kFb6fpaanFTEom+EoG5EFQiYVEP 8lqYLkOafOrh3X1GQOIT4ySQdptAsuiKBUpFd1tcZg5RPFdHkVZkdtNeDM+PT1/RPoKM miAb98zwtUhw4y5UChRll/08JUUJPxhwQMHrbot4SdF86nHNUfHuiRl/XPKI/mxzZAuX fy3SGBvI0WHRq4kyRvylAV58juaLSeMsFj56/r36UitPfiI351l40GoJnfAK/cY7vR+z 7O9bvQls4iSghYelcQY22VPqzFdhYyGlTs+LXT1FtEwf+oYViEaVKlK6WB6wok9gl4mb tfYQ== X-Gm-Message-State: AE9vXwPBxrVzdpXwSILhbKvpSsSeXS8e36qaYdLbWeVrgxuo14b3ecYIUWx4EAaZNX7z1g== X-Received: by 10.66.185.14 with SMTP id ey14mr5176773pac.71.1474565437242; Thu, 22 Sep 2016 10:30:37 -0700 (PDT) From: Bart Schaefer Message-Id: <160922103042.ZM7407@torch.brasslantern.com> Date: Thu, 22 Sep 2016 10:30:42 -0700 In-Reply-To: <20160922144250.GA11076@fujitsu.shahaf.local2> Comments: In reply to Daniel Shahaf "Re: Bug: cd auto-completion of .. fails with parentheses in directory name" (Sep 22, 2:42pm) References: <20160922144250.GA11076@fujitsu.shahaf.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug: cd auto-completion of .. fails with parentheses in directory name MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.