sh-realpath
sh-realpath copied to clipboard
[suggestion] emulate readlink using posix ls
stat(1) is not posix compatible.
emulated readlink using ls
Thanks for the PR! I think you're right, ls
is probably a more reliable way to emulate readlink support.
Do you see any reason to keep around the stat readlink emulation? I'm inclined to get rid of it if there's ls readlink emulation.
Also, it might be nice to have an automated test or two around this change, but I'm not super worried about it since it's a bonus feature that's basically a big regex.
I can test this out and verify that it seems to work right sometime in the next few days. Or if someone else wants to try it out and vouch for the change, I'd consider merging it sooner.
the ls readlink emulation is just suggestion. so i didnt consider removing the stat readlink emulation. i think the ls readlink emulation can cover the stat readlink emulation.
and i was careless about an automated test. it's my fault. i'll add automated test soon.
i didnt usually pay attention about automated test. if i may, can i ask you an advice while i add an automated test?