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*

9
  • 1
    @1_CR gena2x is right. My answer omitted special builtins, which take precedence over functions as per POSIX (though some shells are not compliant; bash complies only in POSIX mode). Commented May 29, 2014 at 23:55
  • 1
    Suggested edit: Aliases are disabled when you quote the command (or any part of it), as in \test or 'test' or tes't'. Commented May 30, 2014 at 12:58
  • 2
    That's not full picture. Seems any kind of expansion (in bash manual, all the substitution, tilde expansion and so on called expansion) disables aliases. I tried. Commented May 30, 2014 at 13:05
  • 1
    Quote from the bash man page: "The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. The characters /, $, backtick, and = and any of the shell metacharacters or quoting characters listed above may not appear in an alias name." Commented May 30, 2014 at 15:02
  • 2
    +1 for hints in helping me find the source of this information: it is in the bash man page, under the section COMMAND EXECUTION, second and third paragraphs. Commented Dec 14, 2016 at 18:21