bgnotify: use $2 in preexec hook if $1 is empty

Fixes #5803
This commit is contained in:
Marc Cornellà 2020-09-28 12:09:20 +02:00 committed by GitHub
parent 765966606d
commit 53259f628b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ bgnotify () { ## args: (title, subtitle)
bgnotify_begin() { bgnotify_begin() {
bgnotify_timestamp=$EPOCHSECONDS bgnotify_timestamp=$EPOCHSECONDS
bgnotify_lastcmd="$1" bgnotify_lastcmd="${1:-$2}"
bgnotify_windowid=$(currentWindowId) bgnotify_windowid=$(currentWindowId)
} }