In the Terminal preferences you can find an option to open new windows and tabs in the current working directory. Yet there's a message that says that programs notify Terminal about the current working directory using scape sequences, which I don't know what it means. But the Terminal itself is not doing this, as I would like to create a new tab when I press ⌘+T to open at the same working directory (not ~/). I found this post but it doesn't address this. Here you have a figure with the options:
Open new Terminal tab in current working directory doesn’t work
terminal
Related Question
- How to send the current working directory from bash to Terminal
- Terminal app Tabs, how to position next to current tab instead of at the end
- MacOS – How to open a new Terminal tab in current working directory
- Open a new Safari window in the current Space from Terminal with multiple tabs (URLs)
- MacOS – OS X Terminal – Open Tab in current directory, troubles with umlauts
- MacOS – Open a new Browser Window from Terminal
- How to set the working directory as the tab title in Terminal for Mac
Best Answer
So I found the problem with the Terminal and I'm posting the answer hoping it can help others. The problem was in the definition of the
PROMPT_COMMAND
environmental variable. I changed its definition fromto
appending at the end of the existing
PROMPT_COMMAND
instead and this solved the problem.