Files
JefferyandClaude Opus 5 67106b22c3 refactor(plugin 命名空間): plugin 更名 jsc-doc、hooks 只註冊自己擁有的 worklog
- 五份 manifest 的 name 由 jsc 改為 jsc-doc
- skill 目錄去掉重複的 doc- 前綴共 5 個(doc-funcs → funcs 等),worklog 名稱不變,frontmatter name 同步
- hooks/hooks.json 由合併超集改為只註冊 Stop(worklog):role 的 hook 交還 jsc-generic,避免改名後重複執行
- hook 腳本搜尋路徑與文件內 cache 路徑改指 jsc-doc
- 指令引用改為 /jsc-doc: 前綴;跨 plugin 引用指向 /jsc-code:、/jsc-generic:
- 保留 .docs/doc-funcs-index.md 等產物檔名不變(非 skill 識別名)
- 版號 0.2.6 → 0.2.7

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 17:07:14 +08:00

31 lines
694 B
Bash

#!/usr/bin/env bash
# 自動補全與修正 docker-compose.yaml 行內註解內容
# 用法: bash scripts/fix_comments.sh <file>
set -euo pipefail
file="${1:-}"
if [ -z "$file" ]; then
echo "請指定要處理的檔案"
exit 1
fi
tmp_file="$(mktemp "${file}.tmp.XXXXXX")"
trap 'rm -f -- "$tmp_file"' EXIT
awk '
/^[[:space:]]*#/ { print; next }
/[[:space:]]+#/ {
match($0, /[[:space:]]+#/);
code=substr($0, 1, RSTART - 1);
comment=substr($0, RSTART + RLENGTH);
gsub(/^ +| +$/, "", comment);
if (length(comment)==0) comment="TODO: 補充說明";
print code " # " comment;
next;
}
{ print }
' "$file" > "$tmp_file"
mv -- "$tmp_file" "$file"
trap - EXIT