emad-elsaid / dirtree

Visualizing files paths as an interactive tree, works nicely with gnu linux tools such as find, ls, or git ls-files
MIT License
118 stars 11 forks source link

Setting shopt -s globstar leads to -bash: /usr/local/bin/dirtree: Argument list too long #6

Closed wirthual closed 5 years ago

wirthual commented 5 years ago

Hi, I try to visualize the content of a folder on a Linux machine running ubuntu 18.04

When I execute the command without the globstar setting, I get an output of only the folders, not the files in it.

When I set the globstar flag, I get the following error: bash: /usr/local/bin/dirtree: Argument list too long

emad-elsaid commented 5 years ago

you're hitting the shell limitation for the number of arguments, you can try to list the files another way with find or git ls-files or any other way that returns file paths in lines, then pipe it to dirtree

git ls-files | dirtree -o /path/to/output.html

you'll find more examples in the README.md file. as this is not an issue to dirtree itself i'll close this issue, I hope this is ok for you