jp icon indicating copy to clipboard operation
jp copied to clipboard

error on macos

Open dmytri opened this issue 3 years ago • 2 comments

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

dmytri avatar Nov 01 '22 17:11 dmytri

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.

dnmfarrell avatar Nov 02 '22 21:11 dnmfarrell

Just made a pr to fix, haven't tested yet on macos, but all tests pass on linux

dmytri avatar Nov 03 '22 09:11 dmytri