Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generate a tree structure from the Terminal to use in Markdown document
tree --dirsfirst --noreport -I |
sed '1s/^/```'"$(printf '\n')"'/;$s/$/'"$(printf '\n')"'```/' >

If tree is not available, install it via

brew install tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment