mirror of
https://github.com/philippdieter/zsh-auto-notify.git
synced 2025-10-13 03:58:44 +00:00
Merge pull request #53 from NoUseFreak/patch-1
Mute notifications over ssh
This commit is contained in:
commit
f4766d6981
@ -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 /}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user