From abcf09cb91a9e4305b4b58442e5c087963b8d4f7 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Fri, 4 Apr 2014 11:51:00 -0600 Subject: [PATCH] prompt info func for screen --- plugins/screen/screen.plugin.zsh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh index 7009e7a91..5ecfee2f4 100644 --- a/plugins/screen/screen.plugin.zsh +++ b/plugins/screen/screen.plugin.zsh @@ -51,4 +51,21 @@ if [[ "$TERM" == screen* ]]; then eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT" screen_set $tab_title $tab_hardstatus } -fi \ No newline at end of file +fi + +function screen_prompt_info() { + r="" + # I'm not thrilled about this method of testing + if [ x"$TERM" = x"screen" ] ;then + if [ x"$STY" != x"" ] ; then + r="$STY" + fi + fi + if [ x"$r" = x"" ] ; then + echo "" + else + pre=$1 + post=$2 + echo "$pre$r$post" + fi +} \ No newline at end of file