From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10523 invoked by alias); 1 Oct 2014 13:35:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19191 Received: (qmail 8332 invoked from network); 1 Oct 2014 13:35:18 -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 autolearn=ham version=3.3.2 Date: Wed, 1 Oct 2014 15:35:13 +0200 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: Empty directories Message-ID: <20141001133513.GA26382@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <20141001120022.72b2bf53@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6365-vl-r59709 (2014-09-07) 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 wrote: > >> On 10/01/2014 12:48 PM, Yuri D'Elia wrote: > >>> $ mkdir empty > >>> $ cd empty > >>> > >>> 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" > > 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 will accept the entire path (if > unique) and insert a space after it. > > $ touch pref1_file pref2_file > $ rm pref1 > > 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)