sh-realpath icon indicating copy to clipboard operation
sh-realpath copied to clipboard

[suggestion] emulate readlink using posix ls

Open smoon8 opened this issue 8 years ago • 2 comments

stat(1) is not posix compatible.

emulated readlink using ls

smoon8 avatar May 11 '16 08:05 smoon8

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.

mkropat avatar May 12 '16 17:05 mkropat

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?

smoon8 avatar May 13 '16 04:05 smoon8