gitree icon indicating copy to clipboard operation
gitree copied to clipboard

Feature request: Group by type

Open amaury-hanser opened this issue 4 years ago • 1 comments

Hello,

First of all, gitree is a pretty neat tool!

##I have a feature request. It could be nice to group folders together and then files in the output.

Lets have an exemple:

└── api
    ├── assets
    │   └── img
    ├── index.js
    ├── package-lock.json
    ├── package.json
    └── twig
        ├── _layouts
        │   └── default.twig
        ├── index.twig
        └── partials
            ├── header.twig
            └── socials.twig

What if folders were at the top ?

└── api
    ├── assets
    │   └── img
    └── twig
    │   ├── _layouts
    │   │   └── default.twig
    │   └── partials
    │   │   ├── header.twig
    │   │   └── socials.twig
    │   └── index.twig
    ├── index.js
    ├── package-lock.json
    └── package.json

Does it make sense ?
Am I the only one looking for this kind of output ?

amaury-hanser avatar Feb 03 '21 09:02 amaury-hanser

This is an interesting one! The order is only in its current state as the git only tracks files which we order alphabetically. Specifying different ordering via a flag would be a cool addition.

I can see three types of ordering?

  • Default (files and interwoven with folders, ordered alphabetically)
  • Folders first (folders displayed first, all ordered alphabetically)
  • Files first (files displayed first, all ordered alphabetically)

Definitely taking this on as an issue, but will happily take PRs!

jpwilliams avatar Apr 12 '21 14:04 jpwilliams