rewrite wl-present in posix compliant shell#78
Conversation
|
IMO the posix-compliant version is slightly harder to read, especially around the uses of If there is a strong reason to not depend on bash then I might think about merging this, but for now I tend more towards staying in bash-land, as I understand bash much better than the details of how different shells implement POSIX-compliant mode, and whether that will work on all shells people could have installed as |
|
I agree that particularly the The primary benefit I saw was that the script wasn't that difficult to rewrite the script in posix compliant shell. However, bringing up busybox does raise a valid concern: the Which should work in any shell, but I am unsure how I feel about it |
Not sure if this is of interest, but this rewrites scripts/wl-present in posix shell, as nothing in the script particularly required any bashisms. I tested it both with and without pipectl installed and this seems to work just like it did before.
I accidentally left formatting on in my editor, so I ran shfmt. If this pr is of interest, I'll revert the formatting changes and undraft this.