Prefix plugin clones with the username so shared clones don't collide
Clones of omarchy.clock become dhh.clock instead of local.clock, so a published clone carries its author's namespace. The clone command owns the id derivation and gains --edit to open the result in $EDITOR, and the shell exposes clonedFrom in listPlugins so the plugin menu no longer reconstructs clone ids. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2050f28d55
commit
1bc89105d2
@@ -12,7 +12,7 @@ PLUGIN_ICON=$'\U000f0431'
|
||||
case "${1:-}" in
|
||||
enable) filter='(.enabled | not)' ;;
|
||||
disable) filter='.canDisable and .enabled' ;;
|
||||
clone) filter='.firstParty and ((.id | sub("^omarchy\\."; "local.")) as $clone_id | ($plugins | map(.id) | index($clone_id)) == null)' ;;
|
||||
clone) filter='.firstParty and (.id as $id | ($plugins | map(.clonedFrom // "") | index($id)) == null)' ;;
|
||||
remove) filter='(.firstParty | not)' ;;
|
||||
*)
|
||||
echo "Usage: omarchy-menu-plugin <enable|disable|clone|remove>" >&2
|
||||
@@ -40,10 +40,8 @@ id=$(awk -F'\t' -v label="$name" '$2 == label { print $3; exit }' <<<"$rows")
|
||||
[[ -n $id ]] || exit 1
|
||||
|
||||
if [[ $1 == "clone" ]]; then
|
||||
new_id="local.${id#omarchy.}"
|
||||
target="$HOME/.config/omarchy/plugins/$new_id"
|
||||
omarchy-launch-floating-terminal-with-presentation \
|
||||
"omarchy-plugin-clone $(printf '%q' "$id") && exec \$EDITOR $(printf '%q' "$target")"
|
||||
"omarchy-plugin-clone --edit $(printf '%q' "$id")"
|
||||
elif [[ $1 == "remove" ]]; then
|
||||
omarchy-launch-floating-terminal-with-presentation "omarchy-plugin-remove $(printf '%q' "$id")"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user