项目文件夹

文件
wehub-resource-sync b9e05427b1
test / test (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:01:02 +08:00

19 行
696 B
Bash

#!/usr/bin/env bash
# CLAUDE_CONFIG_DIR overrides ~/.claude, matching where the hooks write the flag (issue #34)
flag="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.ponytail-active"
[ -f "$flag" ] || exit 0
mode=$(head -n1 "$flag" | tr -d '[:space:]')
# ultra is the high-intensity mode; flag it amber so it stands out from the
# default green at a glance. The level is still in the text, so color is a
# redundant cue, not the only one.
color=108
[ "$mode" = "ultra" ] && color=173
if [ -z "$mode" ] || [ "$mode" = "full" ]; then
printf '\033[38;5;%sm[PONYTAIL]\033[0m' "$color"
else
printf '\033[38;5;%sm[PONYTAIL:%s]\033[0m' "$color" "$(printf '%s' "$mode" | tr '[:lower:]' '[:upper:]')"
fi