plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

label.1 (1267B)


      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 .MR acme (1) )
     18 or X terminal window
     19 .RI ( e.g.,
     20 .MR 9term (1)
     21 or
     22 .MR 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 .MR 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 .MR 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 	if(builtin cd $1){
     68 		if(flag i) $PLAN9/bin/9 awd || status=''
     69 		status=''
     70 	}
     71 }
     72 .EE
     73 .SH SOURCE
     74 .B \*9/bin/label
     75 .br
     76 .B \*9/bin/awd
     77 .SH BUGS
     78 .I Awd
     79 is also documented in
     80 .MR acme (1) .