kaktree icon indicating copy to clipboard operation
kaktree copied to clipboard

[Feature Request] POSIX ls usage

Open AndreiSva opened this issue 4 years ago • 7 comments

Right now kaktree needs a bunch of non-POSIX ls command line options to work. It would be great to POSIX-fy the ls usage in order to enable the plugin to be used on busybox or BSD systems.

AndreiSva avatar Sep 07 '21 03:09 AndreiSva

Hi, can you be more specific on which tools are non-posix? It requires Perl, and ls with posix keys.

andreyorst avatar Sep 23 '21 18:09 andreyorst

@andreyorst -B is not defined by POSIX, and is not present on a lot of popular alternative coreutils such as busybox.

AndreiSva avatar Sep 23 '21 23:09 AndreiSva

kaktree doesn't require it, and doesn't use it. It seems like a typo in readme.

andreyorst avatar Sep 24 '21 05:09 andreyorst

@AndreiSva I've fixed the typo :smile:. Are there any actual errors on BSD or busybox systems?

andreyorst avatar Sep 25 '21 19:09 andreyorst

-b is still not defined by POSIX and doesn't work on busybox ls or OpenBSD ls, couldn't test on other coreutils. You can see a list of all portable ls options here.

AndreiSva avatar Sep 25 '21 21:09 AndreiSva

hmm -b can be worked around, I guess non-graphic characters are rare in files, though this needs more testing.

andreyorst avatar Sep 26 '21 07:09 andreyorst

Alternatively we could gather the directory list with Perl, but this would require some reimplementation of the build_tree subroutine

andreyorst avatar Sep 26 '21 09:09 andreyorst