Change virtual terminal title in xterm-workalikes
(title)
| 66 | |
| 67 | |
| 68 | def _set_term_title_xterm(title): |
| 69 | """ Change virtual terminal title in xterm-workalikes """ |
| 70 | global _xterm_term_title_saved |
| 71 | # Only save the title the first time we set, otherwise restore will only |
| 72 | # go back one title (probably undoing a %cd title change). |
| 73 | if not _xterm_term_title_saved: |
| 74 | # save the current title to the xterm "stack" |
| 75 | sys.stdout.write("\033[22;0t") |
| 76 | _xterm_term_title_saved = True |
| 77 | sys.stdout.write('\033]0;%s\007' % title) |
| 78 | |
| 79 | |
| 80 | def _restore_term_title_xterm(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…