Merge branch 'MichaelAquilina:master' into master

This commit is contained in:
Konstantin 2024-03-26 15:31:54 +01:00 committed by GitHub
commit e2cef28b4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,12 @@ function _is_auto_notify_ignored() {
# Remove leading whitespace
target_command="$(echo "$target_command" | sed -e 's/^ *//')"
# If the command is being run over SSH, then ignore it
if [[ -n ${SSH_CLIENT-} || -n ${SSH_TTY-} || -n ${SSH_CONNECTION-} ]]; then
print "yes"
return
fi
# Remove sudo prefix from command if detected
if [[ "$target_command" == "sudo "* ]]; then
target_command="${target_command/sudo /}"