Add support for OS X terminals

This commit is contained in:
Dylan Araps 2016-05-17 17:20:19 +10:00
parent bbbc7aca04
commit 31dbdaa85a

View file

@ -1738,7 +1738,13 @@ getfont () {
# Terminal Emulator {{{ # Terminal Emulator {{{
getterm () { getterm () {
[ -n "$ITERM_PROFILE" ] && term="iTerm2" # Workaround for OS X systems that
# don't support the block below.
case "$TERM_PROGRAM" in
"iTerm.app") term="iTerm2" ;;
"Terminal.app") term="Apple Terminal" ;;
*) term="${TERM_PROGRAM/\.app}" ;;
esac
# Check $PPID for terminal emulator. # Check $PPID for terminal emulator.
if [ -z "$term" ]; then if [ -z "$term" ]; then