$ echo hello; cd ~/Docs
hello
$ !!
echo hello; cd ~/Docs
hello
I want to get hello
and execute the change directory after typing !!
without re-showing echo hello; cd ~/Docs
, again.
Edit:
fc only works for one command, but doesn't execute the full line from terminal. The same for !!
or $(!!)
, they don't work. I tried stty -echo
, but the same - it only hides typing !!
, but still shows the command. The closest solution I had is to store that command then run it from a script.sh
, but it will still show that it's running a script.sh
.