@ghackk/multi-claude 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/unix/claude-menu.sh +19 -3
package/package.json
CHANGED
package/unix/claude-menu.sh
CHANGED
|
@@ -12,11 +12,27 @@ PAIR_SERVER="https://pair.ghackk.com"
|
|
|
12
12
|
|
|
13
13
|
# ─── LAUNCHER SYMLINK HELPERS ─────────────────────────────────────────────
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
local name="$1" # e.g. "claude-zf"
|
|
15
|
+
ensure_local_bin_on_path() {
|
|
17
16
|
local bin_dir="$HOME/.local/bin"
|
|
18
17
|
mkdir -p "$bin_dir"
|
|
19
|
-
|
|
18
|
+
# Already on PATH in this session?
|
|
19
|
+
case ":$PATH:" in
|
|
20
|
+
*":$bin_dir:"*) return ;;
|
|
21
|
+
esac
|
|
22
|
+
export PATH="$bin_dir:$PATH"
|
|
23
|
+
# Persist to shell rc if not already there
|
|
24
|
+
for rc in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do
|
|
25
|
+
[ -f "$rc" ] || continue
|
|
26
|
+
if ! grep -q '\.local/bin' "$rc" 2>/dev/null; then
|
|
27
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$rc"
|
|
28
|
+
fi
|
|
29
|
+
done
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
register_launcher() {
|
|
33
|
+
local name="$1" # e.g. "claude-zf"
|
|
34
|
+
ensure_local_bin_on_path
|
|
35
|
+
ln -sf "$ACCOUNTS_DIR/$name.sh" "$HOME/.local/bin/$name"
|
|
20
36
|
}
|
|
21
37
|
|
|
22
38
|
unregister_launcher() {
|