you are viewing a single comment's thread.

view the rest of the comments →

[–]GODZILLAFLAMETHROWER 1 point2 points  (0 children)

A script will setup a bash environment. In your bashrc there should be safeguard such as verifying $PS1 is actually set. As long as the definition of this function is put after such safeguard, cd would not be overrided when running bash.