Re: Bug with :tree
Bram Moolenaar <[email protected]> Thu, 17 Jun 2004 12:59:35 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Dan Sharp wrote:
> I am having a problem with the :tree command in that it doesn't appear
> to list directory names. Running a simple script like
>
> all:
> :tree .
> :print $name
>
> in my $HOME directory yields (for example)
>
> ./.printers
> ./.muttrc
> ./.mutt/.mutt.aliases
> ./.mutt/.mutt.color
> ./.mutt/.mutt.color.body
> ./.mutt/.mutt.color.header
> ./.mutt/.mutt.color.header.agents
> ./.mutt/.mutt.color.index
> ./.mutt/.mutt.personal
> ./.mutt/.muttrc.forall
> ./.xscreensaver
> ./.netscape/plugins/rpnp.so
> ./.netscape/plugins/raclass.zip
> ./.mime.types
>
> According to the help for :tree I thought this list should also include
> entries for
>
> ./.mutt
> ./.netscape
> ./.netscape/plugins
>
> as well.
This is a mistake in the documentation. When you don't specify any file
or directory pattern, all files are selected. Directories are not
selected. This works like using {filename = .*}.
You can get both directories and files with:
:tree . {filename = .*} {dirname = .*}
Sorry for the confusion. It was done this way, because getting a mix of
directory and file names is less useful than getting a list of files
only. I use it in a few of my Aap scripts.
--
If you feel lonely, try schizophrenia.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND