Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Good question! I leaned something new today. I learned 2 things, actually: 1) this info about alias expansion at the time the function def is read, and 2) that I should really read the bash manual carefully (which I thought I already did, but apparently didn't ^^ ) Commented Dec 13, 2016 at 10:44
  • 4
    The main question is, should anyone use aliases in noninteractive mode? That's what functions are for, and aliases just make scripting more error-prone. I've actually never needed the info above, because I only ever encountered aliases in .bashrc files at the very top. Commented Dec 13, 2016 at 11:04