diff --git a/functions/_agents_repo_ensure_symlink.fish b/functions/_agents_repo_ensure_symlink.fish index 6ff43d9..2e56b95 100644 --- a/functions/_agents_repo_ensure_symlink.fish +++ b/functions/_agents_repo_ensure_symlink.fish @@ -20,7 +20,7 @@ # having no backup at all. # # When is an existing real directory, its contents are copied into -# without clobbering (cp -n) before the directory is replaced by +# without clobbering (cp --update=none) before the directory is replaced by # the link, so adopting a populated live directory never overwrites the # copy already in the vault. # @@ -60,7 +60,7 @@ function _agents_repo_ensure_symlink --argument-names link target else if test -d "$link" set -l contents (command ls -A "$link" 2>/dev/null) if test (count $contents) -gt 0 - command cp -rn "$link/." "$target/"; or return 1 + command cp -r --update=none "$link/." "$target/"; or return 1 end rm -rf "$link"; or return 1 else if test -e "$link" diff --git a/functions/agents-init.fish b/functions/agents-init.fish index 10e441b..6cd030c 100644 --- a/functions/agents-init.fish +++ b/functions/agents-init.fish @@ -354,7 +354,7 @@ function agents-init --description 'scaffold AGENTS/ sub-repo with agent spec fi set -l rel (string replace "$root/" "" "$src") set -l contents (command ls -A "$src" 2>/dev/null) if test (count $contents) -gt 0 - if not command cp -rn "$src/." "$canonical/" + if not command cp -r --update=none "$src/." "$canonical/" echo "$c_err""Error: could not merge $rel → AGENTS/$tgt$c_reset" >&2 return 1 end @@ -437,7 +437,7 @@ function agents-init --description 'scaffold AGENTS/ sub-repo with agent spec fi test -d "$devlogs_dir"; or mkdir -p "$devlogs_dir" set -l contents (command ls -A "$docs_devlogs" 2>/dev/null) if test (count $contents) -gt 0 - if not command cp -rn "$docs_devlogs/." "$devlogs_dir/" + if not command cp -r --update=none "$docs_devlogs/." "$devlogs_dir/" echo "$c_err""Error: could not copy docs/devlogs → AGENTS/devlogs$c_reset" >&2 return 1 end diff --git a/functions/agents-vault.fish b/functions/agents-vault.fish index 3de7a17..1a7ba79 100644 --- a/functions/agents-vault.fish +++ b/functions/agents-vault.fish @@ -893,7 +893,7 @@ function agents-vault --description 'track curated agent memory in a host-scoped if test -n "$stash" test -f "$stash/origin" and command cat "$stash/origin" >>"$entry/origin" 2>/dev/null - command cp -rn "$stash/." "$entry/" 2>/dev/null + command cp -r --update=none "$stash/." "$entry/" 2>/dev/null rm -rf "$stash" end printf 'renamed: %s → %s (%s)\n' "$prev_slug" "$slug" (date -I) >>"$entry/origin"