OX(1)                                                       OX(1)

     NAME
          ox - Omero X file editor and command interpreter

     SYNOPSIS
          ox [ -s spaceid ] [ -d ] [ file ]

     DESCRIPTION
          Ox is the standard omero(1) editor and shell. Most editing
          is handled by the omero text panel. The editor is only in
          charge of handling omero events to look for further files,
          execute external comands, and performing I/O to the file
          system to load and store files.  The mouse interface is that
          described in omero(1).

          The user interface has one col panel per user editing. It
          contains a tag line that can be edited freely by the user,
          and a text panel for actual file edition.

          The first word in the tag line corresponds to the path of
          the file being edited or the directory being shown.  Tempo-
          rary panels shown for command output (that do not correspond
          to any file), have an arbitrary string inside square brack-
          ets as file names.  To save a temporary edit, its tag must
          be edited to reflect a valid file path.

          Commands executed by ox get their current directory set to
          that of the file shown in the panel where the command was
          issued. Panels for directories run at the directories they
          show. Panels for files run at the directory that contains
          the file. Panels for command output are named with the
          directory name, the command name and its pid inside square
          brackets.

          The [Cmds] panel shows the list of commands run by ox that
          are still running and proposes commands to kill any of them.

          Ox understands by itself the following commands. When a com-
          mand is considered dangerous it requires confirmation. To
          confirm, inssist on running the command.

          Done to delete the corresponding panel.

          Put  to put changes back to the file system. The file
               updated is that named by the tag line (i.e., the first
               word of the tag line).

          Get [arg]
               to get a fresh copy of the file (throwing away any
               change) or the directory. If the file has changes, this
               requires confirmation. With an argument, this command

     OX(1)                                                       OX(1)

               loads a, perhaps new, file into the editor.

          Cmds To show the [Cmds] panel with the list or commands run
               by ox that are still running.

          Font to switch between omero T and R fonts.

          E cmd
               to run the sam(1) command cmd on the last selection
               performed in omero by the user (as said by /dev/sel).
               If the selection is null, the command is applied to the
               whole text.  Note that the selection corresponds to
               what /dev/sel says, and that is usually shared among
               user terminals. This permits applying a command from
               one omero to a selection made at a different terminal.

          >cmd to run cmd using the last user selection as its stan-
               dard input.

          <cmd to replace the selection by the standard output of the
               command.

          |cmd to pipe the selection through a filter command.

          Ox uses youps(4) to listen at both the edit and and exec
          ports.  Messages sent to edit request a new edition. When
          looking for things in omero, ox loads files and directories
          without even looking at the plumbing service. If a thing
          looked for is not a file, plumbing is tried. If this fails,
          a search is performed in the omero panel.

          A file address can be given by the plumber. Numeric
          addresses are interpreted as line numbers, other addresses
          are interpreted by grep(1), which translates them to line
          numbers.

          There is no command in ox to get multiple views for a single
          editing. Instead, the user can replicate the GUI for any
          editing by using omero(1). To do so, it is advisable to
          replicate the whole column for the edit, and not just the
          text panel.

          As a help for the user, ox shows different popular commands
          for each file on its tag line, depending on the file name.
          The file $home/lib/oxcmds can be used to override the
          default behaviour.  It must contain lines with a regexp(6)
          pattern, a single tab, and some text. The text is shown for
          files whose names match the regular expression. The first
          matching expression wins. Put more specific ones first. An
          empty oxcmds causes ox not to show any extra commands.

          The special pattern plumb can be used in oxcmds to specify

     OX(1)                                                       OX(1)

          which files should go to the plumbing service and not open
          with the editor. What would be the additional text in the
          entry is now a regular expression matched on the file name.

          The flag -s is used by omero to tell ox which namespace id
          it is using, just to display each namespace marked with a
          different color in the screen.

     SOURCE
          /sys/src/cmd/ox
          /rc/bin/Clean

     FILES
          $home/lib/oxcmds

     SEE ALSO
          omero(1)

     BUGS
          There is no clean way to prevent the user from replicating
          just a tag, or a text panel.