[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect cursor position when navigating with 'ALT-b'
From: |
Greg Wooledge |
Subject: |
Re: incorrect cursor position when navigating with 'ALT-b' |
Date: |
Thu, 1 Feb 2024 11:14:02 -0500 |
On Thu, Feb 01, 2024 at 01:55:50PM +0100, Korneel Dumon wrote:
> Repeat-By:
> Execute the following command:
> > curl -X POST -H "Content-Type: application/json"
> https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-test-service
> -d '{"countryCode":"BE", "vatNumber":"0000000000"}'
> Then use "arrow up" to recall the command and use "ALT-b" to navigate
> to 'test-service' and
> change it to 'number'. Execute this command. It will fail and if you
> recall it again using "arrow up"
> you should see that the text was changed in the wrong place (offset of
> one character).
This might be caused by an incorrect PS1 (prompt) variable. You must
ensure that any non-printing sequences in PS1 (colors, etc.) are
enclosed in \[ \] characters. See
<https://mywiki.wooledge.org/BashFAQ/053> for details.
If changing to PS1='\$ ' or something similar makes the problem go away,
then you know it's your PS1 causing it.