Reputation: 5960
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.
Upvotes: 1
Views: 51
Reputation: 374
The issue is with your terminal emulator from here. I use gnome's default terminal and changed the "Preserve Working Directory" setting in Behaviour >> shell
to "Never" and it all worked fine.
Upvotes: 0
Reputation: 312
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
Upvotes: 2