mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 05:56:41 +02:00
feat: auto-relink skill symlinks on prefix config change (#578)
New bin/gstack-relink creates prefixed (gstack-*) or flat symlinks based on skill_prefix config. gstack-config auto-triggers relink when skill_prefix changes. Setup guards against recursive calls with GSTACK_SETUP_RUNNING env var. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,11 @@ case "${1:-}" in
|
||||
else
|
||||
echo "${KEY}: ${VALUE}" >> "$CONFIG_FILE"
|
||||
fi
|
||||
# Auto-relink skills when prefix setting changes (skip during setup to avoid recursive call)
|
||||
if [ "$KEY" = "skill_prefix" ] && [ -z "${GSTACK_SETUP_RUNNING:-}" ]; then
|
||||
GSTACK_RELINK="$(dirname "$0")/gstack-relink"
|
||||
[ -x "$GSTACK_RELINK" ] && "$GSTACK_RELINK" || true
|
||||
fi
|
||||
;;
|
||||
list)
|
||||
cat "$CONFIG_FILE" 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user