diff options
Diffstat (limited to 'src/libremessages')
-rwxr-xr-x | src/libremessages | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libremessages b/src/libremessages index 756e19a..ff7476b 100755 --- a/src/libremessages +++ b/src/libremessages @@ -88,9 +88,13 @@ stat_done() { } # Set the terminal title -# TODO test on several terms - it works on screen/tmux term_title() { - printf "\033k%s\033\\" "$@" + local fmt='' + case "$TERM" in + screen|tmux) fmt='\ek%s\e\\';; + xterm*|rxvt*) fmt='\e]0;%s\a';; + esac + printf "$fmt" "$*" } # usage : in_array( $needle, $haystack ) |