Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Issue with directory word completion
- X-seq: zsh-workers 31319
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Issue with directory word completion
- Date: Sun, 21 Apr 2013 15:44:32 -0500
- Cc: zsh-workers@xxxxxxx, Felipe Contreras Garza <felipe.contreras@xxxxxxxxx>
- 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==
- In-reply-to: <130421114424.ZM6610@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: <CAMP44s2U3Mx+X__usCcp5adQwYOLwfpWudm3uVzA7Nktxp8Frw@mail.gmail.com> <130421114424.ZM6610@torch.brasslantern.com>
On Sun, Apr 21, 2013 at 1:44 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author