Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Group by type #57

Open
amaury-hanser opened this issue Feb 3, 2021 · 1 comment
Open

Feature request: Group by type #57

amaury-hanser opened this issue Feb 3, 2021 · 1 comment
Assignees

Comments

@amaury-hanser
Copy link

amaury-hanser commented Feb 3, 2021

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 ?

@jpwilliams
Copy link
Owner

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 jpwilliams self-assigned this Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants