From cfeaadbc88a707de8cbbfcd84316f49116df30da Mon Sep 17 00:00:00 2001 From: "John Ankarstr\\xf6m" Date: Mon, 31 May 2021 19:56:57 +0200 Subject: Add manual --- safetitle.1 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 safetitle.1 diff --git a/safetitle.1 b/safetitle.1 new file mode 100644 index 0000000..b94faba --- /dev/null +++ b/safetitle.1 @@ -0,0 +1,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. -- cgit v1.2.3