From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27125 invoked by alias); 21 Apr 2013 20:44:40 -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: 31319 Received: (qmail 16562 invoked from network); 21 Apr 2013 20:44:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.174 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=rXfrC/6qQHFU+MDMpqj5fAt/YW7Y/gxgmaBK3Isyx3I=; b=fHlexj4DmbcQcBpPz6Hphah28BalQs+dAC/4clI6fKojv1BJ8PuRAvHTfVJk2Pmq9H 7LFmWi5VRZHzvPqg+JXLboM2lWblAVWqeNPNLvth5ljrv+fNcHczTHGk4/1ALqA56iFO Y3NIueOXEZOK2kyOrhdZhnKTrL/7Mg4epbxjw61iBX8wsbdXmWb/Z6M6WS36lggCPPof vqcEw2SNBfQ/NVMjlwLFFBKut0o8sWIu5lEgx6eYolQ/w76gnXwahZ03CTTppVjzHJOC XATbtxxX2gFhR6xvFHnqCVSU6XUQz85wMuVNdV9Pwl9+lKr2cKixhg/oy3FIZx9BBZ4s N+sA== MIME-Version: 1.0 X-Received: by 10.152.6.162 with SMTP id c2mr11817343laa.20.1366577072900; Sun, 21 Apr 2013 13:44:32 -0700 (PDT) In-Reply-To: <130421114424.ZM6610@torch.brasslantern.com> References: <130421114424.ZM6610@torch.brasslantern.com> Date: Sun, 21 Apr 2013 15:44:32 -0500 Message-ID: Subject: Re: Issue with directory word completion From: Felipe Contreras To: Bart Schaefer Cc: zsh-workers@zsh.org, Felipe Contreras Garza Content-Type: text/plain; charset=UTF-8 On Sun, Apr 21, 2013 at 1:44 PM, Bart Schaefer wrote: > On Apr 21, 6:22am, Felipe Contreras wrote: > } > } compadd -f -- 'Documents' 'Downloads/' > > You're not supposed to include a trailing slash on the compadd string. > The completion system will figure that out on its own and append the > slash if appropriate. Note from the docs for -f: > > ... all of the matches built from WORDS are > marked as being the names of files. They are not required to > be actual filenames ... > > "Downloads/" is not an "actual filename" so it's marked as a file. The > "actual filename" of the directory is "Downloads". Yeah, you are explaining the status quo, not why the status quo makes *sense*. > I can already hear your objection, but what you're running into here is > a division-of-labor decision: the calling shell code is capable of doing > the slash removal, and therefore it is left to it to do so rather than > complicate the already fairly incomprehensible internals even further. It would make sense to do so, but suit yourself. -- Felipe Contreras