Is it possible to make bash change directory in command line simply by typing that directory without any commands like cd
?
For example is it possible instead of writing this:
$ cd /tmp
I just want to write only this:
$ /tmp
In other words if I call directory as an application then I want to set that directory as a working one.
Best Answer
In bash there is also
autocd
option. You can enable it by usingshopt -s autocd
: