Blob


1 .TH LABEL 1
2 .SH NAME
3 label, awd \- set window label
4 .SH SYNOPSIS
5 .B label
6 .I string
7 .br
8 .B awd
9 [
10 .I sysname
11 ]
12 .SH DESCRIPTION
13 .I Label
14 sets the label of the current
15 .I win
16 (see
17 .IR acme (1))
18 or X terminal window
19 .RI ( e.g.,
20 .IR 9term (1)
21 or
22 .IR xterm (1))
23 by echoing a special control sequence to standard output.
24 .PP
25 .I Acme
26 and
27 .I 9term
28 windows assume the label is a directory name.
29 When unrooted file names are plumbed in the window,
30 they are evaluated relative to the directory named in the label.
31 .PP
32 The label may have a suffix
33 BI /- sysname \fR,
34 which is not interpreted as part of the directory during plumbing.
35 .I Awd
36 sets the window name to the current directory with a
37 .BI /- sysname
38 suffix, using the name of the current system by default.
39 .SH EXAMPLE
40 One can use the following
41 .IR sh (1)
42 function to keep the label up-to-date in response to
43 .I cd
44 commands:
45 .IP
46 .EX
47 _cd () {
48 \ecd "$@" &&
49 case $- in
50 *i*)
51 awd
52 esac
53 }
54 alias cd=_cd
55 cd .
56 .EE
57 .PP
58 .IR Rc (1)
59 installs a similar
60 .B fn
61 .B cd
62 at startup if there is not already a function named
63 .BR cd :
64 .IP
65 .EX
66 fn cd {
67 builtin cd $1 && flag i && awd
68 }
69 .EE
70 .SH SOURCE
71 .B \*9/bin/label
72 .br
73 .B \*9/bin/awd
74 .SH BUGS
75 .I Awd
76 is also documented in
77 .IR acme (1).