This is an alias script for ln -s
that takes arguments in either order and creates your symlink based on which files exist.
Who can ever remember the order of arguments to ln -s
? It doesn't even matter because the user's intention is always unambiguous. Also the argument order is reversed in junction.exe
on Windows, which makes it even harder to remember if you use both.
For example, GNU ln
works fine with ln -s /tmp mytmp
, but if you forget the argument order, can't figure out the useless manpage, and use the wrong order ln -s mytmp /tmp
, then it not only won't return an error, it will make a broken symlink called /tmp/mytmp
that points to the nonexistent mytmp
. This is stupid. It's clear that the user wants a symlink called mytmp
that points to /tmp
, because /tmp
exists and mytmp
doesn't.