I\'v always wondered what they\'re used for? Seems silly to put them in every time if you can never put anything inside them.
function_name () {
#stateme
Without function, alias expansion happens at definition time. E.g.:
alias a=b
# Gets expanded to "b() { echo c; }" :
a() { echo c; }
b
# => c
# Gets expanded to b:
a
# => c
With function however, alias expansion does not happen at definition time, so the alias "hides" the definition:
alias a=b
function a { echo c; }
b
# => command not found
# Gets expanded to b:
a
# => command not found
unalias a
a
# => c