@workscribe/cli 1.15.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workscribe/cli",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Passive developer work journal — automatic terminal activity summaries",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/shell/hook.bash CHANGED
@@ -26,9 +26,12 @@ _workscribe_precmd() {
26
26
  _workscribe_last_cmd=""
27
27
  _workscribe_git_before=""
28
28
  fi
29
- if [[ -f "$HOME/.workscribe/alerts.pending" ]]; then
29
+ # Skip the alert check on the first precmd: it fires before the shell has
30
+ # finished initializing, and that output gets mistaken for a startup error.
31
+ if [[ -n "$_workscribe_primed" ]] && [[ -f "$HOME/.workscribe/alerts.pending" ]]; then
30
32
  command workscribe alerts --check
31
33
  fi
34
+ _workscribe_primed=1
32
35
  }
33
36
 
34
37
  trap '_workscribe_preexec' DEBUG
package/shell/hook.fish CHANGED
@@ -30,8 +30,11 @@ function _workscribe_postexec --on-event fish_postexec
30
30
  set -e _workscribe_cmd
31
31
  set -e _workscribe_git_before
32
32
  end
33
- if test -f "$HOME/.workscribe/alerts.pending"
33
+ # Skip the alert check on the first postexec: it fires before the shell
34
+ # has finished initializing, and that output gets mistaken for a startup error.
35
+ if set -q _workscribe_primed; and test -f "$HOME/.workscribe/alerts.pending"
34
36
  command workscribe alerts --check
35
37
  end
38
+ set -g _workscribe_primed 1
36
39
  end
37
40
  # workscribe:hook:end
package/shell/hook.zsh CHANGED
@@ -23,9 +23,12 @@ _workscribe_precmd() {
23
23
  _workscribe_cmd=""
24
24
  _workscribe_git_before=""
25
25
  fi
26
- if [[ -f "$HOME/.workscribe/alerts.pending" ]]; then
26
+ # Skip the alert check on the first precmd: it fires before the shell has
27
+ # finished initializing, and that output gets mistaken for a startup error.
28
+ if [[ -n "$_workscribe_primed" ]] && [[ -f "$HOME/.workscribe/alerts.pending" ]]; then
27
29
  command workscribe alerts --check
28
30
  fi
31
+ _workscribe_primed=1
29
32
  }
30
33
 
31
34
  autoload -Uz add-zsh-hook