This isn't the case for sourced scripts. Running a script in bash from fish that changes your current directory will do one of two things: It'll move you to that directory but inside of a bash shell, or it will move you to that directory in a bash shell, bash's cd will return, and you'll be in the same directory as before, still in the fish shell.