jp
jp copied to clipboard
error on macos
I have a user on MacOs and my jp-based script doesn't work, it seems jp itself doesn't work on mac os, asked the user to type jp 1 2 31 to test and got the error line 347: -2: substring expression < 0 on last item in stack
I don't have a mac, so unable to debug further
jp 1 2 3
3
2
: line 347: -2: substring expression < 0
It's hard to say without knowing their setup but my guess would be they're not using Bash 4.3 or higher. AFAIK MacOS ships with zsh and Bash 3.2.
Just made a pr to fix, haven't tested yet on macos, but all tests pass on linux