aboutsummaryrefslogtreecommitdiff
path: root/safetitle.1
blob: b94faba78726bc545ea151c232b5407cf78087dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.Dd $Mdocdate$
.Dt safetitle 1
.Os
.Sh NAME
.Nm safetitle
.Nd safely set title of terminal window
.Sh SYNOPSIS
.Nm
.Op Fl d
.Ar title
.Sh DESCRIPTION
.Pp
.Nm
sets the title of the current terminal window,
if and only if the terminal type is recognized.
By default, only
.Xr xterm 1
is recognized.
To add more terminals, you can modify the source code.
.Pp
If run within
.Xr screen 1 ,
.Nm
will correctly identify the terminal in which
.Xr screen 1
is run.
.Pp
.Nm
is superstitious about the type of the terminal
because some terminals do not support the control sequences
that modify the title.
Specifically, NetBSD's
.Xr wscons 4
is rendered (almost) unusable when it is sent such control sequences.
.Nm
provides a simple interface to setting the title in terminals that support it,
while leaving terminals that do not support it alone.
.Sh DIAGNOSTICS
.Pp
If you pass the
.Fl d
flag,
.Nm
will warn you if the terminal type is not recognized.
.Sh AUTHORS
.Pp
.Nm
is written by John Ankarström
.Aq Mt john (at) ankarstrom.se .
.Sh BUGS
.Pp
.Nm
supports
.Xr screen 1 ,
except if there are more than one terminal attached to the current session.
In that case,
.Nm
will err on the side of caution and regard the terminals as unrecognized.
Thus, the title will not be set.