[PATCH v4] tree: new applet

rknecht at pm.me rknecht at pm.me
Mon May 2 21:15:48 UTC 2022


> On Mon, 2 May 2022 01:40:39 +0800
> Kang-Che Sung explorer09 at gmail.com wrote:
>
> > Hi Roger,
> >
> > May I suggest you add an option to draw the tree lines using ASCII
> > characters only, and make the Unicode support optional at build time?
> >
> > I just feel uncomfortable when I see source code containing embedded UTF-8
> > characters and the strings have no ASCII alternative.
> >
> > The DOS tree command has the "/a" option. You know what I mean.
> >
> > Thank you.
>
>
> Hi,
> something like ?:
>
> #ifdef CONFIG_TREE_ASCII_ONLY
> #define PREFIX_CHILD "|- "
> #define PREFIX_LAST_CHILD "|_ "
> #define PREFIX_GRAND_CHILD "| "
> #define PREFIX_LAST_GRAND_CHILD " "
> #else
> #define PREFIX_CHILD "├── "
> #define PREFIX_LAST_CHILD "└── "
> #define PREFIX_GRAND_CHILD "│ "
> #define PREFIX_LAST_GRAND_CHILD " "
> #endif
>
Agree, I even think the default should be ASCII only with an build option for the unicode tree.
The ASCII only mode reduces also the binary size.

Thanks,
Roger


More information about the busybox mailing list