How to turn off word wrap in iTerm2?

后端 未结 3 1276
梦毁少年i
梦毁少年i 2021-01-30 03:49

How to turn off word wrap in iTerm2? Is there a specific command to do so or in the preferences? I am trying to avoid having the text run down to the next line. I would rather s

3条回答
  •  终归单人心
    2021-01-30 04:32

    For me, my issue was purely down to the configuration of my PS1 - not what I had originally expected!

    The key for me was surrounding the following with any characters that wouldn't be printed as in your prompt - such as encoding colours. Sourced from https://linoxide.com/how-tos/change-bash-prompt-variable-ps1/

    \[ This sequence should appear before a sequence of characters that don’t move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly. \] This sequence should appear after a sequence of non-printing characters.

提交回复
热议问题