浏览代码

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

Fixes #5803
Marc Cornellà 4 年之前
父节点
当前提交
53259f628b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)
 }