From 6aa43e140e3e0d46547e5eab7a1a96fc1513f991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Fri, 27 Dec 2013 22:41:08 +0100 Subject: [PATCH] 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. --- liquidprompt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liquidprompt b/liquidprompt index 19a84f0..02e694a 100755 --- a/liquidprompt +++ b/liquidprompt @@ -362,11 +362,14 @@ esac if [[ "$TERM" == screen* ]]; then 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_ENABLE_TITLE = LP_ENABLE_TITLE && LP_ENABLE_SCREEN_TITLE )) else LP_BRACKET_OPEN="${LP_MARK_BRACKET_OPEN}" LP_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE}" fi +[[ "_$TERM" == _linux* ]] && LP_ENABLE_TITLE=0 + # 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 # window.