NAME
rwd, conswdir – maintain remote working directory |
SYNOPSIS
rwd path
conswdir [ prog ] |
DESCRIPTION
Rwd and conswdir conspire to keep rio(4) and acme(4) informed
about the current directory on remote systems during login sessions.
Rio and acme include this information in plumb messages sent to
plumber(4). If the remote system's name space is mounted in the
plumber's name space, the end result is that file
paths printed during the session are plumbable. Rwd informs rio and acme of directory changes. The name of the remote machine is taken from the environment variable $remotesys. Rwd writes the full path to /dev/wdir; writes the last element of the path, suffixed by @remotesys, to /dev/label; and when run inside a win (see acme(1)) window, changes the window title to path/–remotesys using /dev/acme/ctl.
Conswdir copies standard input to standard output, looking for
in–band messages about directory changes. The messages are of the
form:
|
EXAMPLES
Add this plumbing rule (see plumb(6)) in order to run commands
in the plumber's name space:
Connect to the Unix system, processing in–band directory change
messages:
|
SOURCE
/rc/bin/rwd /sys/src/cmd/aux/conswdir.c |
SEE ALSO
plumber(4), plumb(6), srv(4) |
BUGS
This mechanism is clunky, but Unix and SSH make it hard to build
a better one.
The escape sequence was chosen because it changes the title on
xterm windows. |