Skip to content

Comment on Fish shell 2.2parent

Comments

It seems a lot of people don't realize `bash`, `sh`, `zsh` etc... are executable binaries just like any other on the system, and that you don't need to be logged in to a bash shell to run bash scripts.

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.