Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Start my Fish shell always from home, rather than the previous location?

I use the Fish shell, using the config from this dotfiles repository: https://github.com/kevinrenskers/dotfiles/tree/main/fish.

The problem is that whenever I open a new tab in my terminal, that it starts off from the previous path, instead of from my user’s home folder. How can I change this behavior so that every terminal always opens from ~?

The weird thing is that I’ve been using these dotfiles for forever and I never had this problem until I formatted my computer and set it up from scratch. No idea why now it behaves like this, but I really don’t like it.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The solution is to update your config.fish file

# all your actual command

# Start in home directory
cd ~

By adding the cd ~ at the end of your config file, it’ll be excecuted everytime you open a new fish instance as the last command.

You can change the ~ with any path where you want to start from but the ~ is for home.

It’s similar to a .bashrc or a .zshrc only the name change

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading