Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Empty directories
- X-seq: zsh-users 19191
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Empty directories
- Date: Wed, 1 Oct 2014 15:35:13 +0200
- In-reply-to: <m0gt5k$i0h$1@ger.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <m0gm6c$iq2$1@ger.gmane.org> <m0gmae$iq2$2@ger.gmane.org> <20141001120022.72b2bf53@pwslap01u.europe.root.pri> <m0gt5k$i0h$1@ger.gmane.org>
On 2014-10-01 14:47:48 +0200, Yuri D'Elia wrote:
> On 10/01/2014 01:00 PM, Peter Stephenson wrote:
> > On Wed, 01 Oct 2014 12:50:54 +0200
> > Yuri D'Elia <wavexx@xxxxxxxxxx> wrote:
> >> On 10/01/2014 12:48 PM, Yuri D'Elia wrote:
> >>> $ mkdir empty
> >>> $ cd empty<TAB>
> >>>
> >>> will just stop at 'empty/'.
> >>>
> >>> Is there a way to make directories/local-directories accept empty
> >>> directories as valid?
> >>
> >> I should perhaps state that the obvious reasoning behind this is the
> >> "rmdir" completion.
> >
> > I'm still not understanding. Like cd completion, "rmdir empty<TAB>"
> > will also stop at "empty/" (with a / that disappears if you hit return
> > immediately). But what else could you want?
>
> In normal file completion, prefix<tab> will accept the entire path (if
> unique) and insert a space after it.
>
> $ touch pref1_file pref2_file
> $ rm pref1<tab>
>
> With an empty directory though the path is not accepted even though
> there is nothing more to complete.
Why do you think that it is not accepted? And what does "not accepted"
mean?
Perhaps you mean that the ending slash should not be there in case of
"leaf" directories, i.e. when there is nothing else to complete (no
other directories, or not enough permission to enter them)? The main
advantage I could see here is that you immediately get the information
that you have reached a leaf directory. Otherwise this is a bit
useless.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author