Rendering trees in the terminal

TL;DR

A little function for rendering textual trees in the terminal.

Here it is:

Here’s the sample run in the program:

foo
\_ bar
|  \_ Bar
|  |  \_ Baaaar!
|  |_ BAR
|  \_ BaBaR
\_ baz
   \_ galook

Bigger trees with bigger depths might be hard to read, I’m thinking of using different colors for different depths to make things easier.

Stay safe everybody!


Comments? Octodon, , GitHub, Reddit, or drop me a line!