Search code examples
macosbashterminalcommand-line-interfacecd

Why "type cd" on Mac OS states that "cd is a function"?


On Mac OS Yosemite, I type the following:

Max:~ Max$ type cd
cd is a function
cd ()
{
    __zsh_like_cd cd "$@"
}
Max:~ Max$ 

I thought cd is a shell builtin. Why is that? Can someone elaborate on that?


Solution

  • As @fedorqui says this is because something has created a cd function to override the alias.

    This specific one appears to come from rvm.