diff options
| author | Gautam krishna R <rgautamkrishna@gmail.com> | 2023-12-22 14:27:23 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 09:57:23 +0100 |
| commit | 9004c177bac951f46ab1ec5b74a8bcfb8e3c686b (patch) | |
| tree | 6cd83db8bb0268f97ca83b1e3fc96be72092db7c /plugins | |
| parent | 17e96bf91ee0bc3dc27fa65b0ea7b10d3b971f9d (diff) | |
| download | zsh-9004c177bac951f46ab1ec5b74a8bcfb8e3c686b.tar.gz zsh-9004c177bac951f46ab1ec5b74a8bcfb8e3c686b.tar.bz2 zsh-9004c177bac951f46ab1ec5b74a8bcfb8e3c686b.zip | |
fix(bgnotify): make it work with `set -e` (#12111)
Co-authored-by: ipChrisLee <chrisleecn@outlook.com>
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/bgnotify/bgnotify.plugin.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 3c0766191..c28a29e19 100644 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -21,11 +21,11 @@ function bgnotify_end { local elapsed=$(( EPOCHSECONDS - bgnotify_timestamp )) # check time elapsed - [[ $bgnotify_timestamp -gt 0 ]] || return - [[ $elapsed -ge $bgnotify_threshold ]] || return + [[ $bgnotify_timestamp -gt 0 ]] || return 0 + [[ $elapsed -ge $bgnotify_threshold ]] || return 0 # check if Terminal app is not active - [[ $(bgnotify_appid) != "$bgnotify_termid" ]] || return + [[ $(bgnotify_appid) != "$bgnotify_termid" ]] || return 0 [[ $bgnotify_bell = true ]] && printf '\a' # beep sound bgnotify_formatted "$exit_status" "$bgnotify_lastcmd" "$elapsed" |
