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.


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:


basically, you can just add something like:

fish_style_dir_cmd='CurDir=`pwd|sed -e "s!$HOME!~!"|sed -Ee "s!([^/])[^/]+/!\1/!g"`'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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