fix: select_agents — printf '%s\n' évite l'interprétation des codes ANSI comme format
This commit is contained in:
+4
-4
@@ -170,19 +170,19 @@ detect_agents() {
|
|||||||
select_agents() {
|
select_agents() {
|
||||||
header "Pour quel(s) agent(s) installer ?"
|
header "Pour quel(s) agent(s) installer ?"
|
||||||
|
|
||||||
local agent_input=""
|
local -a agent_lines=()
|
||||||
for agent in "claude-code" "gemini-cli" "codex" "hermes"; do
|
for agent in "claude-code" "gemini-cli" "codex" "hermes"; do
|
||||||
local detected=0
|
local detected=0
|
||||||
for a in "${DETECTED_AGENTS[@]}"; do [[ "$a" == "$agent" ]] && detected=1; done
|
for a in "${DETECTED_AGENTS[@]}"; do [[ "$a" == "$agent" ]] && detected=1; done
|
||||||
if [[ $detected -eq 1 ]]; then
|
if [[ $detected -eq 1 ]]; then
|
||||||
agent_input+="${agent}\t${GRV_GREEN}✓ détecté ${RESET}${GRV_FG}${agent}${RESET}\n"
|
agent_lines+=("${agent}"$'\t'"${GRV_GREEN}✓ détecté ${RESET}${GRV_FG}${agent}${RESET}")
|
||||||
else
|
else
|
||||||
agent_input+="${agent}\t${GRV_GRAY}○ non installé ${agent}${RESET}\n"
|
agent_lines+=("${agent}"$'\t'"${GRV_GRAY}○ non installé ${agent}${RESET}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
local raw_selected
|
local raw_selected
|
||||||
raw_selected=$(printf "$agent_input" | fzf \
|
raw_selected=$(printf '%s\n' "${agent_lines[@]}" | fzf \
|
||||||
--multi \
|
--multi \
|
||||||
--ansi \
|
--ansi \
|
||||||
--delimiter='\t' \
|
--delimiter='\t' \
|
||||||
|
|||||||
Reference in New Issue
Block a user