mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-20 11:19:56 +08:00
feat: add bin/gstack-slug helper + migrate all inline SLUG computation
Extract the opaque SLUG sed pipeline into a shared 5-line shell script. Replace 8 inline copies across templates with eval $(gstack-slug). Sanitizes branch names (/ → -) to prevent subdirectory creation.
This commit is contained in:
@@ -114,7 +114,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
|
||||
Look for brainstorm output:
|
||||
|
||||
```bash
|
||||
SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
|
||||
eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
|
||||
ls ~/.gstack/projects/$SLUG/*brainstorm* 2>/dev/null | head -5
|
||||
ls .context/*brainstorm* .context/attachments/*brainstorm* 2>/dev/null | head -5
|
||||
```
|
||||
|
||||
@@ -49,7 +49,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
|
||||
Look for brainstorm output:
|
||||
|
||||
```bash
|
||||
SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
|
||||
eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
|
||||
ls ~/.gstack/projects/$SLUG/*brainstorm* 2>/dev/null | head -5
|
||||
ls .context/*brainstorm* .context/attachments/*brainstorm* 2>/dev/null | head -5
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user