OPEN(1) OPEN(1) NAME o/open - open files SYNOPSIS o/open [ -d ] DESCRIPTION Open listens for events posted by ox(1) via ports(4) to see if the user tries to look for something. For each string the user is looking that matches an entry in its configura- tion file, open executes the corresponding command. This is a portable replacement for plumber(4) in the Octopus. The configuration file is kept at $home/lib/open and con- tains one entry per line. Each entry has a regular expres- sion, a tabulator, and a command line, perhaps using refer- ences to sub-expressions in the style of sed(1). The regular expression determines if the string the user is looking for matches the configuration entry or not. Matching is case- insensitive. Open would reload its configuration when asked to look for `!reload'. Thus, typing that string and trying to open it as a file from ox(1) makes open reload its configuration file. But beware that it aborts upon fatal errors regarding configuration. EXAMPLE This is an example configuration file to send URLs to the host web browser. # send urls to the view device http://.* echo >/mnt/view/open.url # send manual pages as stdin to `oxopen' in the # host system, to make ox(1) show them ([a-z0-9]+)([0-9]+)) os rc -c 'man 2 1 | oxopen' </dev/null SOURCE /usr/octopus/port/open.b FILES $home/lib/open BUGS The name space is that of the Inferno at the PC, and there- fore it is not trivial to write rules that refer to names in the underlying OS name space, that is, /mnt/fs must be used to let the Inferno command reach host files. The command should do that by itself (perhaps under a -9 flag). OPEN(1) OPEN(1) Relative paths are not (yet) handled correctly.