dduan / tre

Tree command, improved.
MIT License
880 stars 18 forks source link

choice of git/non-git-tracked files is unclear #127

Open simonmichael opened 1 year ago

simonmichael commented 1 year ago

Thank you for tre! I was looking for a tree that lists only directories/files tracked by git. I think you worked towards that in 0.4.0, but there are still some issues. Eg:

~/src$ git clone --depth 1 https://github.com/simonmichael/hledger.git
~/src$ cd hledger/.github
~/src$ mkdir new  # create an uncommitted, unignored directory
~/src/hledger/.github$ git ls-files | grep / | cut -d / -f 1 | uniq  # only two dirs are committed here
ISSUE_TEMPLATE
workflows
~/src/hledger/.github$ tree -d  # tree -d shows committed and uncommitted dirs
.
|-- ISSUE_TEMPLATE
|-- new
`-- workflows
    `-- old

4 directories
~/src/hledger/.github$ tre -d  # tre -d shows committed dirs and uncommitted ignored dirs (old is mentioned in .gitignore)
.
├── ISSUE_TEMPLATE
└── workflows
    └── old
~/src/hledger/.github$ tre --version
tre-command 0.4.0

Wishlist: