Move $TERM checks out of _lp_title

Move $TERM checks for the TITLE feature (LP_ENABLE_TITLE) from runtime
to init time as the terminal will not change during the shell's life.
This commit is contained in:
Olivier Mengué 2013-12-27 22:41:08 +01:00
parent d91e1422b0
commit 6aa43e140e

View File

@ -362,11 +362,14 @@ esac
if [[ "$TERM" == screen* ]]; then if [[ "$TERM" == screen* ]]; then
LP_BRACKET_OPEN="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_OPEN}${NO_COL}" LP_BRACKET_OPEN="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_OPEN}${NO_COL}"
LP_BRACKET_CLOSE="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_CLOSE}${NO_COL}" LP_BRACKET_CLOSE="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_CLOSE}${NO_COL}"
(( LP_ENABLE_TITLE = LP_ENABLE_TITLE && LP_ENABLE_SCREEN_TITLE ))
else else
LP_BRACKET_OPEN="${LP_MARK_BRACKET_OPEN}" LP_BRACKET_OPEN="${LP_MARK_BRACKET_OPEN}"
LP_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE}" LP_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE}"
fi fi
[[ "_$TERM" == _linux* ]] && LP_ENABLE_TITLE=0
# update_terminal_cwd is a shell function available on MacOS X Lion that # update_terminal_cwd is a shell function available on MacOS X Lion that
# will update an icon of the directory displayed in the title of the terminal # will update an icon of the directory displayed in the title of the terminal
# window. # window.