Skip to content

Commit

Permalink
OSX bash compatibility fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Janhouse committed Jan 4, 2016
1 parent 205179e commit 7d2a200
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -37,9 +37,12 @@ A [Powerline](https://github.com/Lokaltog/vim-powerline) like prompt for Bash/ZS
CHROOT=`ls -di / | awk '{if ($1 != "2") print 1; else print 0;}'`
function _update_ps1() {
if [ "$TERM" != "linux" ] ; then
PREV=$?
EXTRA=`logname`@`hostname`
export PS1="$(~/.powerline-shell.py ${PREV} --width ${COLUMNS} --chroot ${CHROOT} --extra ${EXTRA})"
if [ "$(uname)" == "Darwin" ]; then
update_terminal_cwd
fi
PREV=$?
EXTRA=`logname`@`hostname`
export PS1="$(~/.powerline-shell.py ${PREV} --width ${COLUMNS} --chroot ${CHROOT} --extra ${EXTRA})"
fi
}

Expand Down

0 comments on commit 7d2a200

Please sign in to comment.