Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Empty directories



On 10/01/2014 09:58 PM, Bart Schaefer wrote:
> On Oct 1, 2014 11:15 AM, "Yuri D'Elia" <wavexx@xxxxxxxxxx> wrote:
>> Ok, so maybe we can cut it short and avoid to append a slash on empty
>> directories directly on the first run?
> 
> The trouble is there is no way to tell that a directory is empty except by
> looking "inside" it.  If the directory is network-mounted or contains
> thousands of files (or, worse, both) that could be an enormous performance
> hit to save you typing one character.
> 
> We might be able to do something with the newly-added short-circuit glob
> qualifier, but that doesn't help with the network mount issue, and it still
> means manufacturing a path tail, testing it, and then throwing it away
> again.

Very good point, yes.

Something "unexpected" on a same vein happens with glob_complete and
repeated slashes. Assuming "compinit" has been called, try with the
following for maximum enjoyment:

$ anything .//<TAB>





Messages sorted by: Reverse Date, Date, Thread, Author