|
NAME
| |
label, awd – set window label
|
SYNOPSIS
| |
label string
awd [ sysname ]
|
DESCRIPTION
| |
Label sets the label of the current win (see acme(1)) or X terminal
window (e.g., 9term(1) or xterm(1)) by echoing a special control
sequence to standard output.
Acme and 9term windows assume the label is a directory name. When
unrooted file names are plumbed in the window, they are evaluated
relative to the directory named in the label.
The label may have a suffix /−sysname, which is not interpreted
as part of the directory during plumbing. Awd sets the window
name to the current directory with a /−sysname suffix, using the
name of the current system by default.
|
EXAMPLE
| |
One can use the following sh(1) function to keep the label up-to-date
in response to cd commands:
| |
_cd () {
| |
\cd "$@" &&
case $− in
*i*)
awd
esac
|
}
alias cd=_cd
cd .
|
Rc(1) installs a similar fn cd at startup if there is not already
a function named cd:
| |
fn cd {
| |
if(builtin cd $1){
if(flag i) $PLAN9/bin/9 awd || status=''
status=''
}
|
}
|
|
SOURCE
BUGS
|
|