Date: Fri, 27 Sep 2024 01:48:13 +0200 From: Steffen Nurpmeso <stef...@sdaoden.eu> Message-ID: <20240926234813.hgDdmZkJ@steffen%sdaoden.eu>
| I changed it to (but tab indent; private credits to you..) | | if [ -z "$___SHRC" ]; then | if [ "$-" != "${-%i*}" ] || [ "$-" != "${-%m*}" ] || [ -z "${0%-*}" ]; then You want the third test to use %% rather than % or you won't detect a login shell (presumably interactive) (without -i or -m for some reason, which seems unlikely in modern times) if its name happens to contain a '-' character ... -shell-2.7 would become -shell with your string sub, which is not empty, and -z fails. kre