In ~/.bashrc, I defined some aliases. But I cannot use them in other shell scripts, where I can only use aliases defined right there. Even though I sourced bashrc, it still did not work. What should I do?
PS. I'm in bash.
You need to do shopt -s expand_aliases
in the script in addition to sourcing ~/.bashrc
.