Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection uname output: Linux fedora-desktop 6.1.11-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 9 20:36:30 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 5.2
Patch Level: 15
Release Status: release

Description:
When you scroll your command history, it will display part of the previous command
    and append the previous->previous command after it.

Repeat-By:
    WARNING: The following will REPLACE your
    current .bash_history file! Take care.

    1. Start you terminal and run this command:

    echo "ls -la
    ls -la
    cd Coding/
    ls
    cd libdick/
    valgrind --leak-check=full ./build/test
    cd ..
    cd rust/hostname-ip-address/
    valgrind --leak-check=full ./target/debug/hostname-ip-address
    cd
    cp .bash_history .bash_history_backup
    nvim .bash_history
    exit" > .bash_history

    2. Exit terminal
    3. Restart terminal
    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/"

Now, if you start to delete what is on the prompt, you will end up with:
    "$ valgrind -"

Reply via email to