One reason... (Reply) [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Anonymous Tue 2004-02-24 06:35
One reason...
Just read your rant. One of the reasons you might want to use shell aliases instead of functions are that they are designed for interactive use, and can easily be side-stepped by prepending a "\" to a command.

Observe:

$ alias "foo=foo2"
$ foo
foo2: command not found.
$ \foo
foo: command not found.
$ unalias foo
$ foo(){foo2;}
$ foo
foo2: command not found.
$ \foo
foo2: command not found.

They are also processed internally by bash at a different point in execution.
Link Read Comments
Reply:
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting