From: NRK Date: Wed, 25 Jan 2023 19:07:08 +0000 (+0600) Subject: plugins/chksum: use exit instead of return X-Git-Tag: v4.8~31^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ca8fcf454a30b20a6c7ecd4a8dee6ecf8f6349a7;p=nnn.git plugins/chksum: use exit instead of return From https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_24: | The return utility shall cause the shell to stop executing the current | function or dot script. If the shell is not currently executing a | function or dot script, the results are unspecified. Closes: https://github.com/jarun/nnn/issues/1572 --- diff --git a/plugins/chksum b/plugins/chksum index 5fa91cbf..9441cc18 100755 --- a/plugins/chksum +++ b/plugins/chksum @@ -61,7 +61,7 @@ elif [ -n "$1" ]; then if echo "$1" | grep -q \.${chks}$; then ${chks}sum -c < "$1" read -r _ - return + exit fi done checksum_type