bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cmd history is not displaying correctly


From: Mr. Dick Steel
Subject: Re: Cmd history is not displaying correctly
Date: Sun, 19 Feb 2023 16:21:26 +0200
User-agent: Roundcube Webmail/1.4.11

On 19-02-2023 16:07, Greg Wooledge wrote:
On Sun, Feb 19, 2023 at 03:05:24PM +0200, Mr. Dick Steel wrote:
    4. Use up arrow to scroll cmd history up until you hit:
"$ valgrind --leak-check=full ./target/debug/hostname-ip-address"
        and press up arrow once more and you will get:
        "$ valgrind -cd rust/hostname-ip-address"

    Expected result:
    "$ cd rust/hostname-ip-address/"

This sounds like a PS1 (prompt) issue to me.  Do you have color escape
sequences, or other such things, in your PS1 variable? If so, they have
to be isolated within \[ \] markers, so bash knows they don't cause
the cursor to move.

https://mywiki.wooledge.org/BashFAQ/053

You are absolutely correct!
I have this in my .bashrc:

export PS1="\e[1;32m[\u@\h \W]\$ \e[m"

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]