Misaligned Terminal Output Formatting

Status Fixed / completed
Maintainer reply ✓ Yes — igorkofman
Activity 8 comments · opened Feb 24, 2025 · closed Mar 18, 2025
💡 Likely answer: A maintainer (igorkofman, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
When running the program, the terminal output is not well formed. When comparing to the output of running it in a separate bash session, it looks wrong. Terminal output should be correctly formatted. This output consists of three lines. The three lines are there, but they are offset incorrectly so that the columns do not align.

Expected output:

   |  3 |  3 |  3 |  3 |  3 |  3 |
 0                                 0
   |  3 |  3 |  3 |  3 |  3 |  3 |

claude output:

  ⎿  |  3 |  3 |  3 |  3 |  3 |  3 |
      0                                 0
        |  3 |  3 |  3 |  3 |  3 |  3 |

Environment Info

  • Platform: linux
  • Terminal: Guake terminal
  • Version: 0.2.8
  • Feedback ID: 9ffa6d84-c209-4e41-9e87-85a7af099030

View original on GitHub ↗

8 Comments

igorkofman collaborator · 1 year ago

<img width="349" alt="Image" src="https://github.com/user-attachments/assets/ad76586d-d231-4c36-bb8e-03797c80469b" />

Cannot repro this with the latest version in Apple Terminal

Please re-open if this issue persists.

ekenberg · 1 year ago

@igorkofman I do not have permission to re-open the issue, but the problem is still there. I think it is related to Claude using Bash. Read() works as in your example. Claude using Bash does not work. Directly executing commands with exclamation mark does not work:

!Image

I believe Claude removes initial spaces from Bash output.

igorkofman collaborator · 1 year ago

Thanks - we'll dig in!

igorkofman collaborator · 1 year ago

Should be fixed in the next version (Monday)

ekenberg · 1 year ago

Update FYI: problem still persists in v0.2.48

! cat foo.txt
  ⎿  |  3 |  3 |  3 |  3 |  3 |  3 |
      0                                 0
        |  3 |  3 |  3 |  3 |  3 |  3 |

> show contents of foo.txt

● Read(file_path: "/home/johan/tmp/foo.txt")…
  ⎿     |  3 |  3 |  3 |  3 |  3 |  3 |
      0                                 0
        |  3 |  3 |  3 |  3 |  3 |  3 |
igorkofman collaborator · 1 year ago

Oh man, this regressed. Fixing and adding tests :)

igorkofman collaborator · 1 year ago

(pass) BashTool output > preserves leading whitespace in output - should be fixed permanently tomorrow.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.