OX(1) OX(1) NAME ox - omero editor and shell SYNOPSIS o/x [ -9dnp ] [ -o odir ] [ -l ldir ] [ -i initcmd ] DESCRIPTION O/x is a program that implements a shell to browse the file system, edit, and execute commands while using o/mero. Flag -d activates debug diagnostics and option -o can be used to select odir instead of /mnt/ui as the root directory for the window system. Flag -l can be used to ask o/x to load an already existing interface found at directory ldir instead of creating its own. The interface should come from a previ- ous instance of o/x (e.g., by using tar(1) to save and restore it). See the example below. In many cases, o/x runs under flag -9 causing all file names to be interpreted in the host underlying Inferno (expected at /mnt/fs) and all commands to be executed by the host sys- tem. As an optimization, flag -n may be used when the Inferno used does not call rfork(2) using the RFNAMEG flag for executing host commands. That is the case at Lsub. Flag -p makes o/x persist, so it re-spawns a new instance of the program after it dies. This is used to make sure that there is always a shell program running at the PC. Flag -i makes o/x run initcmd as if it was executed on the tag line of the initial directory shown. For the most part, o/x can be handled via the o/mero tag and panel commands described in olive(1). Besides, o/x includes its own command language consisting of builtin commands, Sam commands, host commands, and inferno commands. Beware that unlike other editors in Plan 9 and Inferno, o/x applies the commands to the user selection (determined by the last text panel where the used mouse button 1, as explained in olive(1)). Host commands are commands executed by the host system underlying Inferno (eg., Plan 9). Inferno commands are com- mands executed by the Inferno system where o/x runs. Edition commands are similar to those of the Sam editor, and builtin commands are any of the following ones: Ctl ctl Executes the control request ctl on the text panel of the last user selection. See omero(4) for the full list. Cmds Shows the list of commands that have not yet OX(1) OX(1) finished. Dup screen (understood at the directory panel shown by o/x) creates a new directory panel to browse the file system. The optional screen names the screen where the new panel is to be shown. Panels for files (and directories without the screen argu- ment) are shown in the screen of the directory panel used to open them. If the screen does not exist in o/mero it is created before showing the new directory panel on it. Edit Makes the buffer consider that commands executed on it are Sam commands by default. Rc Makes the buffer consider that commands executed on it are host commandsferno by default (i.e., rc(1) commands on Plan 9). Sh Makes the buffer consider that commands executed on it are Inferno commands by default (i.e., sh(1) commands). End Terminates the program. Keep prevents o/x for automatically closing the panel when too many panels are open. Scroll Toggles the default behaviour regarding scrol- ling for new output panels. A command is considered a Sam command by default, unless preceded by a `%', a `!', or a `;' sign: cmd ... Executes the Sam command cmd. %cmd... Executes the Inferno command cmd. ;cmd ... Executes the host command cmd. !cmd ... Executes cmd at the host when o/x is under flag -9 and at Inferno otherwise. This is the most used idiom, and executes the commands in the system where the files being browsed reside. See sam(1) for a description of the language. The commands `b', `k', `q', `u', and `!' are not implemented by o/x, and two new commands are available: P/regexp/ cmd For each panel whose name matches regexp exe- cute cmd. Here, only f, D, and e are valid commands. The default is `f'. The former prints the name of the panel, D closes the panel, and e replicates the panel to the screen used to execute the command (or to the path given as an argument as shown in exam- ples). Q/regexp/ cmd Similar to P, but executes cmd for panels not matching regexp. Commands executed as if they were executed using a `!' escape. OX(1) OX(1) O/x posts events using ports(4) to notify about commands executed (starting with `exec:', the command text, `#', and the directory for the command) and files open (starting with `look:' and the file path). Only the first line of the com- mand is posted when it contains multiple lines. EXAMPLES Save the session for O/x to use it later: % cd /mnt/ui/appl % tar c col:ox.* >/tmp/oxui.tar Start o/x to continue a saved session: % cd /mnt/ui/appl % tar x </tmp/oxui.tar % ox -l /mnt/ui/appl/col:ox.* To get a new o/x directory panel in the a new screen, named s1 you may execute: Dup s1 in any directory panel shown by o/x. To copy all the panels from the stats row in the main screen to the stats section of the other screen, execute this com- mand in o/x: P/main.*stats/ e /other/row:stats SOURCE /usr/octopus/port/x SEE ALSO olive(1), sam(1), and omero(4). BUGS The editor language por panels still needs more work.