In zsh, executing the directory path will cd into it. I want to make bash shell to behave the same. The idea is to check and see if the error is bash: /xyz: Is a directory
and cd into '/xyz' and silence the error message.
For this to work I need a custom error handler. trap
catches signals and the mentioned error does not create a signal (or does it?).
This is not about the bash script, but the actual bash shell one uses every day. Is it possible?
zsh
gives that exact same error message.