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.

Required fields*

3
  • 1
    "aliases don't work inside shell script constructs like if/then and for/do loops" does not appear to be the case in any shell I tried. Commented May 2, 2020 at 16:02
  • 1
    The question was only about bash. Aliases can be of limited use by setting a shell option, shopt -s expand_aliases, but using functions is more robust. I've added a link to a Wikipedia article that may be helpful. Commented May 3, 2020 at 5:52
  • 1
    Ah! expand_aliases was on. Thanks for the clarification! Commented May 3, 2020 at 16:40