Blob
1 .TH LABEL 12 .SH NAME3 label, awd \- set window label4 .SH SYNOPSIS5 .B label6 .I string7 .br8 .B awd9 [10 .I sysname11 ]12 .SH DESCRIPTION13 .I Label14 sets the label of the current15 .I win16 (see17 .IR acme (1))18 or X terminal window19 .RI ( e.g.,20 .IR 9term (1)21 or22 .IR xterm (1))23 by echoing a special control sequence to standard output.24 .PP25 .I Acme26 and27 .I 9term28 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 .PP32 The label may have a suffix33 .BI /- sysname \fR,34 which is not interpreted as part of the directory during plumbing.35 .I Awd36 sets the window name to the current directory with a37 .BI /- sysname38 suffix, using the name of the current system by default.39 .SH EXAMPLE40 One can use the following41 .IR sh (1)42 function to keep the label up-to-date in response to43 .I cd44 commands:45 .IP46 .EX47 _cd () {48 \ecd "$@" &&49 case $- in50 *i*)51 awd52 esac53 }54 alias cd=_cd55 cd .56 .EE57 .PP58 .IR Rc (1)59 installs a similar60 .B fn61 .B cd62 at startup if there is not already a function named63 .BR cd :64 .IP65 .EX66 fn cd {67 if(builtin cd $1){68 if(flag i) $PLAN9/bin/9 awd || status=''69 status=''70 }71 }72 .EE73 .SH SOURCE74 .B \*9/bin/label75 .br76 .B \*9/bin/awd77 .SH BUGS78 .I Awd79 is also documented in80 .IR acme (1).