4 ms·
Trees are quite hard to do well in a CLI app. Everything from the Unicode drawing to the sizing to the color choices. This one looks great.
by sillysaurusx 5y ago
Trees are quite hard to do well in a CLI app. Everything from the Unicode drawing to the sizing to the color choices. This one looks great.
- jldugger 5y agojust saying: pstree figured it out
- monocasa 5y agoIt's not like ldd is a paragon of cli design to begin with. Indentation isn't difficult, you just pass in the indentation level and increment as needed as you recursively walk the tree.
- chjj 5y agoUnicode isn't necessary if the terminal supports ACS.
- eklitzke 5y agoWhat is ACS?
- chjj 5y agoMost terminals (even non-unicode-capable ones) offer a feature to switch into "alt charset mode" which provides glyphs for drawing lines.
- sillysaurusx 5y agoThanks! It’s getting rare to learn about a feature that surprises me, but I had no idea about this.
- monocasa 5y agoYou can do a passable job with just + - and | if you need to. Have done that for a ucontroller's cli.