The text displayed and the cursor on Terminal is very often garbled or 'noisy', and this is across releases for as long as I can remember. That said, it seems worse on Big Sur.
Suppose I've got some fairly long pipeline:
lucky@bigsur:/some/directory$ cat foo | grep bar | tee baz
Next, I want to edit this string slightly, so I hit 'Up Arrow' so the last command appears. Then I hit 'Back Arrow' once. Now, instead of the cursor being under 'z' in 'baz', it goes all the way to the 'l' in 'lucky'. If I start typing it appears to be in Insert mode, i.e., lucky is being overwritten, but its not. And actually, I'm somewhere in the middle of the command, like 'foo' or 'grep'. Hitting the right or left arrow makes the cursor randomly jump across the line of input.
This is just an example, it expresses itself differently depending on what I'm doing. I'm not certain I'm explaining the issue clearly or that this has been asked elsewhere 'Differently' ;) so please bear with me, and I will elaborate as best as I can.
Things I've already tried:
I have to type Ctl-L (clear screen) and Ctl-E or Ctl-A (jump to end or jump to beginning of line) and it sort of clears it up, until the next command entered.
In my bash_profile I have these snarfed from a similar sounding StackExchange thread somewhere as an attempt to fix it:
# MacOS Terminal weirdness shopt -s checkwinsize # to deactivate: shopt -u checkwinsize export PROMPT_COMMAND="resize &>/dev/null; $PROMPT_COMMAND"
Frankly, it doesn't make a difference, probably because I'm not resizing the window between commands.
Long story short, working with the command line is practically broken.
I'm on Bash, not sure Zsh makes a difference. I know that different emulators suffer the same problem, for example iterm2.
Is there some setting that can ameliorate this?