Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 497902

Summary: allow emerge to update title on st terminal
Product: Portage Development Reporter: Amadeusz Sławiński <amade>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Amadeusz Sławiński 2014-01-12 15:45:30 UTC
http://st.suckless.org/

st allows updating of window title, however seems like emerge ignores this functionality

It would be nice if it could be added.
st uses same escape sequence as xterm
echo -e "\e]0;window title\a"; sleep 3

% echo $TERM
st-256color

.terminfo/s/st           .terminfo/s/st-meta
.terminfo/s/st-256color  .terminfo/s/st-meta-256color


Reproducible: Always
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2014-01-27 01:03:15 UTC
It looks like it simply needs to add them to line 235 in pym/portage/output.py.

Can you please confirm that it works properly for you.


diff --git a/pym/portage/output.py b/pym/portage/output.py
index fc1b042..927749a 100644
@@ -232,7 +232,7 @@ def nc_len(mystr):
 	tmp = re.sub(esc_seq + "^m]+m", "", mystr);
 	return len(tmp)
 
-_legal_terms_re = re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm|rxvt-unicode|gnome|interix)')
+_legal_terms_re = re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm|rxvt-unicode|gnome|interix|st|st-meta|st-256color|st-meta-256color)')
 _disable_xtermTitle = None
 _max_xtermTitle_len = 253
Comment 2 Amadeusz Sławiński 2014-01-27 11:28:58 UTC
Yes it works and seeing that it is a regexp match adding 'st' seems to be enough