[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The cursor moves abnormally
From: |
Greg Wooledge |
Subject: |
Re: The cursor moves abnormally |
Date: |
Sun, 27 Jun 2021 09:27:29 -0400 |
On Sun, Jun 27, 2021 at 12:19:00PM +0000, cheng wensui wrote:
> bash 5.1.4(1)-release (x86_64-pc-linux-gnu)
>
> when ps1 is too long ,The cursor moves abnormally ,Entering letters too
> many too long is also abnormal
>
> example :
> PS1='\033[5;37m[\033[0m\u\033[1;35m@\033[0m\033[4m\H\033[0m\033[1;31m(\t)\033[0m\W
> \033[0;33m\#/\!\033[0m\033[5;37m]\033[0m\033[0;37m\$ '
You're missing the \[ \] around your escape sequences.
See <https://mywiki.wooledge.org/BashFAQ/053> for more details.