Merge pull request #514 from nwinkler/osx-tabs

Added check for OS X update_terminal_cwd
pull/515/head
Nils Winkler 2015-06-26 08:17:25 +02:00
commit 2dd46920eb
1 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,15 @@
cite about-plugin cite about-plugin
about-plugin 'osx-specific functions' about-plugin 'osx-specific functions'
# OS X: Open new tabs in same directory
if [ $(uname) = "Darwin" ]; then
if type update_terminal_cwd > /dev/null 2>&1 ; then
if ! [[ $PROMPT_COMMAND =~ (^|;)update_terminal_cwd($|;) ]] ; then
export PROMPT_COMMAND="update_terminal_cwd;$PROMPT_COMMAND"
fi
fi
fi
function tab() { function tab() {
about 'opens a new terminal tab' about 'opens a new terminal tab'
group 'osx' group 'osx'