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 .SH DESCRIPTION
10 .I Label
11 sets the label of the current
12 .I win
13 (see
14 .IR acme (1))
15 or X terminal window
16 .RI ( e.g.,
17 .IR 9term (1)
18 or
19 .IR xterm (1))
20 by echoing a special control sequence to standard output.
21 .PP
22 .I Acme
23 and
24 .I 9term
25 windows assume the label is a directory name.
26 When unrooted file names are plumbed in the window,
27 they are evaluated relative to the directory named in the label.
28 .SH EXAMPLE
29 One can use the following
30 .IR sh (1)
31 function to keep the label up-to-date in response to
32 .I cd
33 commands:
34 .IP
35 .EX
36 _cd () {
37 \ecd "$@" &&
38 case $- in
39 *i*)
40 awd
41 esac
42 }
43 alias cd=_cd
44 cd .
45 .EE
46 .PP
47 .IR Rc (1)
48 installs a similar
49 .B fn
50 .B cd
51 at startup if there is not already a function named
52 .BR cd :
53 .IP
54 .EX
55 fn cd {
56 builtin cd $1 && flag i && awd
57 }
58 .EE
59 .SH SOURCE
60 .B \*9/bin/label
61 .br
62 .B \*9/bin/awd
63 .SH BUGS
64 .I Awd
65 is also documented in
66 .IR acme (1).
67 .PP
68 .I Awd
69 does not append the
70 .BI - label
71 suffix that it does on Plan 9.