Merge pull request #23 from Avi-D-coder/app-name

Notify app-name=zsh
This commit is contained in:
Michael Aquilina 2019-09-06 09:57:07 +01:00 committed by GitHub
commit 47a0b1727f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ function _auto_notify_message() {
if [[ "$exit_code" != "0" ]]; then if [[ "$exit_code" != "0" ]]; then
urgency="critical" urgency="critical"
fi fi
notify-send "$title" "$body" "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" notify-send "$title" "$body" --app-name=zsh "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
elif [[ "$platform" == "Darwin" ]]; then elif [[ "$platform" == "Darwin" ]]; then
osascript \ osascript \
-e 'on run argv' \ -e 'on run argv' \

View file

@ -89,7 +89,7 @@
assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed' assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed'
assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds" assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds"
assert "$lines[3]" same_as "Exit code: 0" assert "$lines[3]" same_as "Exit code: 0"
assert "$lines[4]" same_as "--urgency=normal --expire-time=15000" assert "$lines[4]" same_as "--app-name=zsh --urgency=normal --expire-time=15000"
} }
@test 'auto-notify-send sends notification on macOS' { @test 'auto-notify-send sends notification on macOS' {