2d1d779f4b
The task case is byte-for-byte identical to v0.2: (ctask:slug|mode) /workspace/path Project sessions append a single |project marker: (ctask:slug|mode|project) /workspace/path Both helpers (.sh and .ps1) are updated symmetrically. The empty case (no CTASK_TASK) still outputs nothing. Smoke verified: - task default: (ctask:demo|local) /tmp/demo - explicit CTASK_TYPE=task: (ctask:demo|local) /tmp/demo - CTASK_TYPE=project: (ctask:demo|local|project) /tmp/demo - no CTASK_TASK: (silent)
15 lines
527 B
Bash
15 lines
527 B
Bash
#!/usr/bin/env bash
|
|
# ctask status line helper for Claude Code
|
|
# Reads ctask environment variables and prints a formatted context string.
|
|
# Output (task): (ctask:<slug>|<mode>) <workspace_path>
|
|
# Output (project): (ctask:<slug>|<mode>|project) <workspace_path>
|
|
# Outputs nothing when not in a ctask session.
|
|
|
|
[ -z "$CTASK_TASK" ] && exit 0
|
|
|
|
if [ "$CTASK_TYPE" = "project" ]; then
|
|
echo "(ctask:${CTASK_TASK}|${CTASK_MODE}|project) ${CTASK_WORKSPACE}"
|
|
else
|
|
echo "(ctask:${CTASK_TASK}|${CTASK_MODE}) ${CTASK_WORKSPACE}"
|
|
fi
|