Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Terminal.app on OS X, you can choose the (for me) useful behavior of new tabs opening in the same working directory. On Mavericks, (and maybe other versions), setting PROMPT_COMMAND disables new tabs from opening in the same working directory. How do I restore that functionality?

This feels like more of a SuperUser question, but feel free to suggest I migrate over to AskDifferent.

share|improve this question

1 Answer 1

It turns out that folks developing the liquid prompt project noticed and found the solution, which is that setting PROMPT_COMMAND seems to disable the execution of update_terminal_cwd:

https://github.com/nojhan/liquidprompt/issues/196

basically, you can just add something like:

fish_style_dir_cmd='CurDir=`pwd|sed -e "s!$HOME!~!"|sed -Ee "s!([^/])[^/]+/!\1/!g"`'
PROMPT_COMMAND="update_terminal_cwd;$fish_style_dir_cmd"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.