Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The backslash basically means "ignore any aliases or functions by the same name, and run the first matching command in my $PATH instead".

One reason for providing this is so that you can have an alias like

    alias mv '\mv -=myfavoritearg '
but it's also good for ensuring that you didn't pick up some distro nonsense.


Thanks! So '\' is special cased here—it's not some specific manifestation of a more general phenomenon of specialised escape-handling in the shell?


> So '\' is special cased here

No; quoting any part of the command name prevents alias expansion. Eg 'mv', "mv", 'm'v, m\v, etc all work.


If I understand correctly, yes, that's how I'd describe it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: