mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-26 14:44:57 +08:00
custom codex prompt dir
This commit is contained in:
parent
8d13a7a39a
commit
6274622a8d
1 changed files with 10 additions and 3 deletions
|
|
@ -113,9 +113,16 @@ co() {
|
|||
fi
|
||||
fi
|
||||
done
|
||||
if [ -d "$PWD/codex-prompts" ]; then
|
||||
local project_prompts_dir=""
|
||||
if [ -d "$PWD/.agent-prompts" ]; then
|
||||
project_prompts_dir="$PWD/.agent-prompts"
|
||||
elif [ -d "$PWD/codex-prompts" ]; then
|
||||
project_prompts_dir="$PWD/codex-prompts"
|
||||
fi
|
||||
|
||||
if [ -n "$project_prompts_dir" ]; then
|
||||
local copied_any=0
|
||||
for f in "$PWD/codex-prompts"/*.md; do
|
||||
for f in "$project_prompts_dir"/*.md; do
|
||||
[ -f "$f" ] || continue
|
||||
copied_any=1
|
||||
if ! cp -f "$f" "$tmp_home/prompts/" >/dev/null 2>&1; then
|
||||
|
|
@ -126,7 +133,7 @@ co() {
|
|||
fi
|
||||
done
|
||||
if (( copied_any )); then
|
||||
print -u2 "co: added project prompts from $PWD/codex-prompts (overriding base on conflicts)"
|
||||
print -u2 "co: added project prompts from $project_prompts_dir (overriding base on conflicts)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue