I suspect the history file is corrupt; truncating a file while another process has it open for writing can do strange things.
On Sun, 19 Feb 2023, 23:05 Mr. Dick Steel, <d...@dicksteel.fi> wrote: > 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 > at this point, what is in the file? does « wc -l .bash_history » report 13? 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 -" > >