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: