How to retrieve lost aliases?

I made an echo command to my .bash_aliases file and erased all of my aliases, except the test alias. However, I still have a session open that has the aliases loaded (into the tcl?). Can I retrieve them from this session?

Asked By: MrUser

||

Easy trick

for alias in $(compgen -a); do type $alias; done
Answered By: dchirikov

You can almost definitely just do:

alias >>./bash_aliases
Answered By: mikeserv
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.