Characters don't display correctly when I cat a file.

7 views
Skip to first unread message

Joe Saladino

unread,
Sep 25, 2022, 9:02:49 PM9/25/22
to iterm2-discuss
When I cat a file, the characters don't display correctly.  One letter is on the right side of the window and the remaining characters in that line are on the next line.  See the attached screenshot.

Anyone have any idea how to fix this?

Thanks
Joe

Joe Saladino

unread,
Sep 25, 2022, 9:04:43 PM9/25/22
to iterm2-discuss
Screenshot didn't make it the first time.  Thanks.
Screen Shot 2022-09-25 at 6.53.31 PM.png

Adrian Bool

unread,
Sep 26, 2022, 12:35:25 AM9/26/22
to iterm2-...@googlegroups.com
Hi Joe

Perhaps some unexpected control characters have managed to sneak into your file?

If you could share either the original file or the output of "xxd <filename>" — which can be used to see if there are any unexpected chars — that may help?

Kind regards,

aid



--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/c44c3f9e-0194-4bc5-be69-f17e98739cefn%40googlegroups.com.
<Screen Shot 2022-09-25 at 6.53.31 PM.png>

Adrian Bool

unread,
Sep 26, 2022, 3:24:41 AM9/26/22
to Joe Saladino, iterm2-discuss
Hi Joe,

Looks like your bash file has a good amount of tab indentation and that you've upped the tab character with from the default of 8 to something like like 16.  This just happens to make the first visible character on some of your lines to be rendered in the last column of the window - with the rest of the line wrapping round.

The tab width can be set in iTerm's preferences within the Advanced tab - use the search bar in there to look for "default tab":



In the above screenshot I've set my iTerm to use a tab with of 16; which gives me the following output of your file in a standard 80 column window:


Just like yours!

Try setting the tab width to 8; reopen a new iTerm window and see if you file is displaying cleanly.

Kind regards

aid


Joe Saladino

unread,
Sep 26, 2022, 8:26:40 AM9/26/22
to Adrian Bool, iterm2-discuss
Ok. Thx so much for your help!

--
____________________________
Joe Saladino [j...@bram.net
(From my iPhone)

“You never realize Jesus is all you need
until Jesus is all you have.”
--Timothy Keller (The Prodigal Prophet)
Joe's Profile

On Sep 26, 2022, at 1:25 AM, Adrian Bool <a...@logic.org.uk> wrote:

Hi Joe,

Looks like your bash file has a good amount of tab indentation and that you've upped the tab character with from the default of 8 to something like like 16.  This just happens to make the first visible character on some of your lines to be rendered in the last column of the window - with the rest of the line wrapping round.

The tab width can be set in iTerm's preferences within the Advanced tab - use the search bar in there to look for "default tab":

PastedGraphic-1.png


In the above screenshot I've set my iTerm to use a tab with of 16; which gives me the following output of your file in a standard 80 column window:

PastedGraphic-2.png

Just like yours!

Try setting the tab width to 8; reopen a new iTerm window and see if you file is displaying cleanly.

Kind regards

aid


--
You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/KKagzCOUjs4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/FCA13420-49BB-45A2-B19E-6A556B87F5C5%40logic.org.uk.
Reply all
Reply to author
Forward
0 new messages