From b3888043d420f87b4a1097cd7753b4725e020373 Mon Sep 17 00:00:00 2001 From: Dmytri Kleiner Date: Thu, 3 Nov 2022 10:38:13 +0100 Subject: [PATCH 1/2] fix: error on macos #6 --- jp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jp b/jp index 5c32ed8..6e8c17b 100755 --- a/jp +++ b/jp @@ -344,7 +344,7 @@ jp_pop () { if [ $JP_STACKSIZE -eq 0 ];then jp_error "cannot pop an empty stack" || return elif [ $JP_STACKSIZE -eq 1 ];then - JP_OUT="${JP_STACK:0:-2}" + JP_OUT="${JP_STACK:0:${#JP_STACK}-2}" JP_STACK= else JP_OUT="${JP_STACK%%$JP_SEP*}" From 75bfd715747592bf592961726c51bd538773b39a Mon Sep 17 00:00:00 2001 From: Dmytri Kleiner Date: Fri, 4 Nov 2022 15:24:07 +0100 Subject: [PATCH 2/2] emergency shebang change --- jp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jp b/jp index 6e8c17b..be10f55 100755 --- a/jp +++ b/jp @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/local/bin/bash # Copyright 2021 David Farrell # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #