Browse Source

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

Fixes #5803
Marc Cornellà 4 years ago
parent
commit
53259f628b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/bgnotify/bgnotify.plugin.zsh

+ 1 - 1
plugins/bgnotify/bgnotify.plugin.zsh

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