commit
fb38802d33
3 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,10 @@
|
|||
Changelog for zsh-auto-notify
|
||||
=============================
|
||||
|
||||
0.8.0
|
||||
-----
|
||||
* Change notify-send application title to `zsh`
|
||||
|
||||
0.7.0
|
||||
-----
|
||||
* Allow alternate `AUTO_NOTIFY_WHITELIST` for specifying commands to allow
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export AUTO_NOTIFY_VERSION="0.7.0"
|
||||
export AUTO_NOTIFY_VERSION="0.8.0"
|
||||
|
||||
# Time it takes for a notification to expire
|
||||
export AUTO_NOTIFY_EXPIRE_TIME=8000
|
||||
|
@ -40,7 +40,7 @@ function _auto_notify_message() {
|
|||
if [[ "$exit_code" != "0" ]]; then
|
||||
urgency="critical"
|
||||
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
|
||||
osascript \
|
||||
-e 'on run argv' \
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed'
|
||||
assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds"
|
||||
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' {
|
||||
|
|
Loading…
Add table
Reference in a new issue