Improve Codex terminal formatted output
What feature would you like to see?
Here is a sample of conversation:
=======================================
› visualizza una tabella formattata in ANSI
• Esegui questo in terminale (usa tput, quindi niente codici ANSI “hardcoded”):
bold=$(tput bold); reset=$(tput sgr0)
cyan=$(tput setaf 6); green=$(tput setaf 2); red=$(tput setaf 1)
printf "┌────┬────────────┬────────┐\n"
printf "│ %s%s%-2s%s │ %s%s%-10s%s │ %s%s%-6s%s │\n"
"$bold" "$cyan" "ID" "$reset" "$bold" "$cyan" "NOME" "$reset" "$bold" "$cyan" "STATO" "$reset"
printf "├────┼────────────┼────────┤\n"
printf "│ %-2s │ %-10s │ %s%-6s%s │\n" "1" "alpha" "$green" "OK" "$reset"
printf "│ %-2s │ %-10s │ %s%-6s%s │\n" "2" "beta" "$red" "FAIL" "$reset"
printf "└────┴────────────┴────────┘\n"
› Usa ANSI escape codes diretti non tput
• printf '\033[1m\033[36m┌────┬────────────┬────────┐\033[0m\n'
printf '\033[1m\033[36m│ ID │ NOME │ STATO │\033[0m\n'
printf '\033[1m\033[36m├────┼────────────┼────────┤\033[0m\n'
printf '│ 1 │ alpha │ \033[32mOK\033[0m │\n'
printf '│ 2 │ beta │ \033[31mFAIL\033[0m │\n'
printf '\033[1m\033[36m└────┴────────────┴────────┘\033[0m\n'
› non visualizzare printf semplicemente formatta l'output della tabella in ANSI
• ┌────┬────────────┬────────┐
│ ID │ NOME │ STATO │
├────┼────────────┼────────┤
│ 1 │ alpha │ OK │
│ 2 │ beta │ FAIL │
└────┴────────────┴────────┘
=======================================
on the end Codex terminal was able to produce a good formatted table, but it required some interactions.
Is it possible to improve formatted output in ANSI by default for any Codex answer that may require it?
Additional information
<img width="1223" height="905" alt="Image" src="https://github.com/user-attachments/assets/fab20893-d1b4-4c56-82ff-e68ac3723c1d" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗