We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40bf218 commit 1cc9ae9Copy full SHA for 1cc9ae9
scripts/lib/profile-io.sh
@@ -34,12 +34,12 @@ write_profile() {
34
fi
35
}
36
37
-# Update profile atomically: takes a jq filter, applies it in one pass.
+# Update profile atomically: forwards jq args and applies them in one pass.
38
# Usage: update_profile '.xp += 10'
39
+# update_profile --arg tech "$TECH" '.concepts_seen += [$tech]'
40
# Requires jq to be installed; callers should guard with `command -v jq`.
41
update_profile() {
- local filter="$1"
42
local current
43
current=$(read_profile)
44
- echo "$current" | jq "$filter" | write_profile
+ printf '%s\n' "$current" | jq "$@" | write_profile
45
0 commit comments