screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add environment variable value to hardstatus line


From: Shigehiko SASAKI
Subject: Re: How to add environment variable value to hardstatus line
Date: Thu, 12 Mar 2015 06:04:25 +0900 (JST)

Hi Mario

you can output escape sequence string to virtual terminal,
so as to display any messages you like in hardstatus line.

bash has some convenient features PROMPT_COMMAND or PS1
to execute any commands before displaying shell prompt message.

for example to display $(envname) in hardstatus line
[[.bashrc]]
# send message to screen hardstatus %h
if [[ "$TERM" =~ "screen" ]]; then
  PROMPT_COMMAND='echo -ne "\033k\033\0134\033k$(envname)\033\\"'
endif

// Shige



reply via email to

[Prev in Thread] Current Thread [Next in Thread]