From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55 invoked by alias); 21 Apr 2013 18:44:33 -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: 31316 Received: (qmail 18770 invoked from network); 21 Apr 2013 18:44:32 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130421114424.ZM6610@torch.brasslantern.com> Date: Sun, 21 Apr 2013 11:44:24 -0700 In-reply-to: Comments: In reply to Felipe Contreras "Issue with directory word completion" (Apr 21, 6:22am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Felipe Contreras , zsh-workers@zsh.org Subject: Re: Issue with directory word completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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". 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.