fix(profile): root follows the git common dir, managed-connector match, name allowlist, nine profiles
backend and web-full were identical to dev and full: removed. Root = parent of the git common dir (worktree-safe, stops at HOME); shared settings read from the -C dir. diff and unset skip no-op output/writes; flag note says the write applies to other sessions only.
This commit is contained in:
1 parent
ffac7e539e
commit
9baba8a88a
11 files changed
+118
-91
No files matched your search
@@ -18,10 +18,16 @@
|
||||
# TMPDIR goes to ~/.cache/claude-tmp either way (BLK-021).
|
||||
# ============================================================
|
||||
|
||||
_cc_name_ok() { [[ "$1" =~ ^[a-z0-9][a-z0-9-]*$ ]]; }
|
||||
|
||||
cc() {
|
||||
local name="${1:-claude-$(date +%H%M%S)}" profile="${2:-}"
|
||||
local lib="$HOME/.claude/lib" settings=""
|
||||
_cc_name_ok "$name" \
|
||||
|| { echo "cc: invalid name '$name' (a-z 0-9 -)" >&2; return 2; }
|
||||
if [ -n "$profile" ]; then
|
||||
_cc_name_ok "$profile" \
|
||||
|| { echo "cc: invalid profile '$profile' (a-z 0-9 -)" >&2; return 2; }
|
||||
settings="$lib/profiles/$profile.json"
|
||||
if [ ! -f "$settings" ]; then
|
||||
echo "cc: unknown profile '$profile'. Known:" >&2
|
||||
|
||||
Reference in new issue
Block a user