How to use aliases defined in .bashrc in other scripts?

You need to do shopt -s expand_aliases in the script in addition to sourcing ~/.bashrc.

Leave a Comment