@workscribe/cli 1.11.0 → 1.13.0
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/dist/index.js +1027 -225
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/shell/hook.bash +3 -0
- package/shell/hook.fish +37 -0
- package/shell/hook.zsh +3 -0
package/package.json
CHANGED
package/shell/hook.bash
CHANGED
package/shell/hook.fish
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Workscribe — developer work journal
|
|
2
|
+
# Do not edit this file manually. Managed by `workscribe init`.
|
|
3
|
+
# workscribe:hook:start
|
|
4
|
+
function _workscribe_preexec --on-event fish_preexec
|
|
5
|
+
set -g _workscribe_cmd $argv[1]
|
|
6
|
+
set -g _workscribe_git_before (git rev-parse HEAD 2>/dev/null; or echo "")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
function _workscribe_postexec --on-event fish_postexec
|
|
10
|
+
set -l exit_code $status
|
|
11
|
+
type -q workscribe
|
|
12
|
+
or return 0
|
|
13
|
+
if set -q _workscribe_cmd; and test -n "$_workscribe_cmd"
|
|
14
|
+
if test -n "$_workscribe_git_before"
|
|
15
|
+
command workscribe _capture \
|
|
16
|
+
--cmd "$_workscribe_cmd" \
|
|
17
|
+
--cwd "$PWD" \
|
|
18
|
+
--exit "$exit_code" \
|
|
19
|
+
--duration "$CMD_DURATION" \
|
|
20
|
+
--git-before "$_workscribe_git_before" \
|
|
21
|
+
> /dev/null 2>&1 &
|
|
22
|
+
else
|
|
23
|
+
command workscribe _capture \
|
|
24
|
+
--cmd "$_workscribe_cmd" \
|
|
25
|
+
--cwd "$PWD" \
|
|
26
|
+
--exit "$exit_code" \
|
|
27
|
+
--duration "$CMD_DURATION" \
|
|
28
|
+
> /dev/null 2>&1 &
|
|
29
|
+
end
|
|
30
|
+
set -e _workscribe_cmd
|
|
31
|
+
set -e _workscribe_git_before
|
|
32
|
+
end
|
|
33
|
+
if test -f "$HOME/.workscribe/alerts.pending"
|
|
34
|
+
command workscribe alerts --check
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
# workscribe:hook:end
|