Uses tree along with a .gitignore file to filter results.
Defaults to ignoring node_modules if no .gitignore can be found in the current directory.
| tree -C -I $((cat .gitignore 2> /dev/null || echo "node_modules") | egrep -v "^#.*$|^[[:space:]]*$" | tr "\\n" "|" | rev | cut -c 2- | rev) |
Made an alternative version: https://gist.github.com/localhostdotdev/78f6a372a8de4cfed6fe4268bae7f8a3 (You have a lot of code I didn't want to review and < 10 downloads a month)
Just use tree --gitignore
@jpwilliams Nice work btw, thanks for the attention! 🥳
Made gitree to resolve this issue.