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