\input texinfo
@setfilename uit.info
@settitle UIT, UNIX Interactive Tools
@ifinfo
@node Top, Introduction, (dir), (dir)

This file documents the UNIX Interactive Tools package.

Copyright (c) 1993, 1994 Tudor Hulubei & Andrei Pitis

@menu
* Introduction::
* Installing UIT::
* Configuration Files::
* uit::
* uitps::
* uitview::
* uitmount::
* uitcmp::
* uitkeys::
* uitmatch::
* uitaction::
* .uitaction::
* Starting uit/uitps/uitview/uitmount::
* Canceling Operations::
* Limitations::
* Bugs::
* Copyright::
* Authors::
@end menu


@end ifinfo

@setchapternewpage odd
@titlepage
@center @titlefont{UIT}
@sp 1
@center UNIX Interactive Tools
@sp 4
@center Version 4.3.1
@sp 1
@center August 1994
@sp 5
@center Tudor Hulubei & Andrei Pitis

@vskip 0pt plus 1filll
Copyright @copyright{} 1993, 1994 Tudor Hulubei & Andrei Pitis

Permission to use, copy, modify, and distribute this software and its
documentation for any non-commercial purpose and without fee is hereby
granted, provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation.

This program is provided AS IS with no warranties of any kind. The author
shall have no liability with respect to the infringement of copyrights,
trade secrets or any patents by this program or any part thereof. In no
event will the author be liable for any lost revenue or profits or other
special, indirect and consequential damages.
@end titlepage


@node Introduction, Installing UIT, Top, Top
@section Introduction

This document presents some basic information that users should know in
order to use UIT effectively. Any questions, comments, or bug reports,
should be emailed to the authors. Please be sure to include the version
number. The email addresses are:

@display
                   tudor@@ulise.cs.pub.ro
                   tudor@@habarnam.cs.pub.ro
@end display


@node Installing UIT, Configuration Files, Introduction, Top
@section Installing UIT


Please read the INSTALL file that comes with the UIT package.


@node Configuration Files, uit, Installing UIT, Top
@section Configuration Files

There is one configuration file per terminal type in uit/uitps/uitview.
The configuration file(s) resides in the user's home directory
or (the default versions) in the directory $(prefix)/lib
(usually /usr/local/lib).
The generic name is .uitrc.TERM. UIT 4.3.1 allows each terminal type to
have its own configuration file (TERM is the value of the TERM environment
variable (e.g vt102). For the Linux console the configuration file is
.uitrc.console).

If you have compiled the UIT package with USE_TERMCAP and your system has
a huge termcap database (/etc/termcap), you can copy the termcap definition(s)
of your terminal(s) in a file ($HOME/.termcap e.g.). After that, set your
TERMCAP environment variable to point to it. You should add something like
this to your .profile :

TERMCAP=/home/mike/.termcap

uit/uitps/uitview can run without such a file, but on systems with huge
termcap databases, copying the definitions of the most used terminals in a
local .termcap will result in uit/uitps/uitview starting faster.

uit/uitps/uitview doesn't use termcap key definitions. You must define the
keys you want directly in the .uit.TERM file in [UITxxx-Keys] sections.

If you have compiled the UIT package with USE_TERMINFO, or on your system
the termcap database is emulated using the terminfo library (like in the
HP-UX system), don't bother about speed.

The configuration file .uitrc.TERM is the file searched by
uit / uitps / uitview each time they are started, in order to configure
themselves.
.uitrc.TERM it is first searched in the home directory then, if not found,
in the directory $(prefix)/lib (usually /usr/local/lib). The configuration
file is structured on sections, each section containing variables in the
following format:

	variable_name = first_field;second_field; ...

After the 'variable_name' at least one space or tab is required. All
characters after a '#' are ignored and if you comment a section name, the
whole section is ignored.

The default configuration file .uitrc.TERM supports most of the usual
commands. To find out more about them please read it. uit allows you to
change both the utility used to perform a particular operation (using compress
instead of gzip :-) ) and the key associated with it. There is also possible
to remove/add new commands.


The configuration file contains the following sections:


@menu
* Section [Setup]::
* Section [UIT-Setup]::
* Section [UITPS-Setup]::
* Section [UITVIEW-Setup]::
* Sections [UITxxx-Color] / [UITxxx-Monochrome]::
* Sections [UITxxx-Keys]::
@end menu


@node Section [Setup], Section [UIT-Setup], , Configuration Files
@section Section [Setup]


In this section the variables have only one field.


a. TempDirectory

- this variable specifies the location of the temporary files created by uit.


b. AnsiColorSequences

- this variable should be set to ON if the terminal supports standard ANSI
color sequences. Otherwise it should be OFF.
If AnsiColorSequences is ON, [UITxxx-Color] sections will be used in the
configuration files .uitrc.TERM. Otherwise, uit / uitps / uitview will use
the [UITxxx-Monochrome] sections.

@xref{Sections [UITxxx-Color] / [UITxxx-Monochrome]}.


@node Section [UIT-Setup], Section [UITPS-Setup], Section [Setup], Configuration Files
@subsection Section [UIT-Setup]

In this section the variables have only one field.


a. StartupFileDisplayMode

- this variable specifies the file specific information displayed at startup.
It can be any of OwnerGroup, DateTime, Size, Mode or FullName.

-  this value initially affects both panels but it can be changed separately
afterwards.


b. StartupFileSortMethod

- this variable specifies the startup sort method. It can be any of Name,
Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName.

-  this value initially affects both panels but it can be changed separately
afterwards.


c. StartupLeftPanelPath

d. StartupRightPanelPath

- those variables specifies the startup path for each panel.


e. HistoryFile
- this variable specifies the history file name. The default value is
~/.uithistory.


f. NormalModeHelp

g. CommandLineModeHelp

- those variables describe the status bar contents for each uit mode when no
errors occurred.
  uit can display on the status bar a help string and/or some system
information (system type, hostname, machine type and the current date)
using escape characters:

@display
        \s      ->      the system type
        \h      ->      the host name
        \m      ->      the machine type
        \d      ->      the current date
@end display

@xref{<ShowTty>}.


h. InfoDisplay

- if this variable is OFF, auxiliary file informations are not displayed. This
can be useful if you are using a very slow terminal.


i. FrameDisplay

- if this variable is OFF, the uit frame is not displayed. This can be useful
if you are using a very slow terminal.

@xref{uit}.


j. LeadingDotMatch

- if this variable is OFF when matching files for <FilePatternSelect> /
<FilePatternUnselect> then the leading '.' in the file name is matched
only explicitly.


@node Section [UITPS-Setup], Section [UITVIEW-Setup], Section [UIT-Setup], Configuration Files
@subsection Section [UITPS-Setup]

In this section the variables have only one field.


a. UitPsModeHelp

- this variable describe the uitps status bar contents.

@xref{uitps}.


@node Section [UITVIEW-Setup], Sections [UITxxx-Color] / [UITxxx-Monochrome], Section [UITPS-Setup], Configuration Files
@subsection Section [UITVIEW-Setup]

In this section the variables have only one field.


a. UitViewModeHelp

- this variable describe the uitview status bar contents.

@xref{uitview}.


@node Sections [UITxxx-Color] / [UITxxx-Monochrome], Sections [UITxxx-Keys], Section [UITVIEW-Setup], Configuration Files
@subsection Sections [UITxxx-Color] / [UITxxx-Monochrome]

In this sections the variables have only one field.

These sections permits you to customize the colors of uit, uitps and uitview.
Reading the .uitrc.TERM configuration file should be self explanatory.

@display
@xref{Section [Setup]},
@xref{Configuration Files}.
@end display


@node Sections [UITxxx-Keys], , Sections [UITxxx-Color] / [UITxxx-Monochrome], Configuration Files
@subsection Sections [UITxxx-Keys]


These sections describe the actions uit/uitps/uitview takes when a specified
key is pressed. In this sections a variable can have up to 6 fields separated
by ';'. Each line in this section looks like:

key_sequence = command_name;formatted_command;new_dir;
               save_screen;pause;hide

@noindent
WARNING: you can't continue the variable fields description on the next line.

@menu
* key_sequence::
* command_name::
* formatted_command::
* new_dir::
* save_screen::
* pause::
* hide::
@end menu


@node key_sequence, command_name, , Sections [UITxxx-Keys]
@subsection key_sequence

- 'key_sequence' is the key sequence associated with the given command. You can
*se any key sequence wich doesn't start with an ascii character (0x20 to 0x7e).
You can specify the ESC character as ^[ , the ^ character as ^^ and space as
^@ . Ascii characters are used by the command line.


@node command_name, formatted_command, key_sequence, Sections [UITxxx-Keys]
@subsection command_name

- 'command_name' is a command generic name. Even if it is not always used, the
'command_name' must be present (if a command is associated with 'key_sequence')
. If it is not, no action will be taken when pressing 'key_sequence'. There are
two types of commands in uit: built-in commands and user defined commands.
Built-in commands are specified between <> (<Copy>, <RenameMove>, <MkDir> etc)
and if the 'command_name' section contains a built-in command specification,
the other fields are ignored.


uitps and uitview are using only built-in commands. These are all the
built-in commands used by uit, uitps and uitview:


The BUILT-IN COMMANDS are:

@menu

* <Copy>::				Available in: uit
* <RenameMove>::			Available in: uit
* <MkDir>::				Available in: uit
* <Delete>::				Available in: uit
* <Exit>::				Available in: uit, uitps, uitview
* <HistoryBack>::			Available in: uit
* <ShowTty>::				Available in: uit
* <Refresh>::				Available in: uit, uitps, uitview
* <GotoRoot>::				Available in: uit
* <SwitchPanels>::			Available in: uit
* <HistoryNext>::			Available in: uit
* <FileDisplayNextMode>::		Available in: uit
* <FileDisplayOwnerGroup>::		Available in: uit
* <FileDisplayDateTime>::		Available in: uit
* <FileDisplaySize>::			Available in: uit
* <FileDisplayMode>::			Available in: uit
* <FileDisplayFullName>::		Available in: uit
* <FileSortNextMethod>::		Available in: uit
* <FileSortByName>::			Available in: uit
* <FileSortByExtension>::		Available in: uit
* <FileSortBySize>::			Available in: uit
* <FileSortByDate>::			Available in: uit
* <FileSortByMode>::			Available in: uit
* <FileSortByOwnerId>::			Available in: uit
* <FileSortByGroupId>::			Available in: uit
* <FileSortByOwnerName>::		Available in: uit
* <FileSortByGroupName>::		Available in: uit
* <DeleteCmdLn>::			Available in: uit
* <FileSelect>::			Available in: uit
* <CopyFileToCmdLn>::			Available in: uit
* <Home>::				Available in: uit, uitps, uitview
* <End>::				Available in: uit, uitps, uitview
* <PageUp>::				Available in: uit, uitps, uitview
* <PageDown>::				Available in: uit, uitps, uitview
* <CursorLeft>::			Available in: uit
* <CursorRight>::			Available in: uit
* <CursorUp>::				Available in: uit, uitps, uitview
* <CursorDown>::			Available in: uit, uitps, uitview
* <ChangePanel>::			Available in: uit
* <ChangeDir>::				Available in: uit
* <HardRefresh>::			Available in: uit, uitps, uitview
* <FilePatternSelect>::			Available in: uit
* <FilePatternUnselect>::		Available in: uit
* <DeleteCmdLnWord>::			Available in: uit
* <ConformCurrentDir>::			Available in: uit
* <ConformOtherDir>::			Available in: uit
* <CopyPathToCmdLn>::			Available in: uit
* <CopySelectedFilesToCmdLn>::		Available in: uit
* <NextSignal>::			Available in: uitps
* <SIGHUP>::				Available in: uitps
* <SIGINT>::				Available in: uitps
* <SIGQUIT>::				Available in: uitps
* <SIGILL>::				Available in: uitps
* <SIGFPE>::				Available in: uitps
* <SIGKILL>::				Available in: uitps
* <SIGUSR1>::				Available in: uitps
* <SIGSEGV>::				Available in: uitps
* <SIGUSR2>::				Available in: uitps
* <SIGPIPE>::				Available in: uitps
* <SIGALRM>::				Available in: uitps
* <SIGTERM>::				Available in: uitps
* <SIGCHLD>::				Available in: uitps
* <SIGCONT>::				Available in: uitps
* <KillProcess>::			Available in: uitps
@end menu


@display
@xref{uit},
@xref{uitps},
@xref{uitview}.
@end display


@node <Copy>, <RenameMove>, , command_name
@subsection <Copy>

in uit:

- copies files from one panel to another.


@node <RenameMove>, <MkDir>, <Copy>, command_name
@subsection <RenameMove>

in uit:

- moves files from one panel to another.


@node <MkDir>, <Delete>, <RenameMove>, command_name
@subsection <MkDir>

in uit:

- makes directories.


@node <Delete>, <Exit>, <MkDir>, command_name
@subsection <Delete>

in uit:

- deletes files and empty directories.


@node <Exit>, <HistoryBack>, <Delete>, command_name
@subsection <Exit>

- exits.


@node <HistoryBack>, <ShowTty>, <Exit>, command_name
@subsection <HistoryBack>

in uit:

- copies to the command line the previous command in the history list.


@node <ShowTty>, <Refresh>, <HistoryBack>, command_name
@subsection <ShowTty>

in uit:

- switches between the two uit modes (starting with Linux 0.99.12 this option 
is completely used only if you are super user because normal users can't do a
screen dump).


@node <Refresh>, <GotoRoot>, <ShowTty>, command_name
@subsection <Refresh>

in uit:

- refreshes the contents of the current panel.

in uitps:

- refresh the processes list by recalling ps(1).

in uitview:

- refresh the screen by re-reading the file.


@node <GotoRoot>, <SwitchPanels>, <Refresh>, command_name
@subsection <GotoRoot>

in uit:

- changes the current directory to root.


@node <SwitchPanels>, <HistoryNext>, <GotoRoot>, command_name
@subsection <SwitchPanels>

in uit:

- switches the left panel with the right one.


@node <HistoryNext>, <FileDisplayNextMode>, <SwitchPanels>, command_name
@subsection <HistoryNext>

in uit:

- copies the next command in the history list to the command line.


@node <FileDisplayNextMode>, <FileDisplayOwnerGroup>, <HistoryNext>, command_name
@subsection <FileDisplayNextMode>

in uit:

- switches to the next file display mode.


@node <FileDisplayOwnerGroup>, <FileDisplayDateTime>, <FileDisplayNextMode>, command_name
@subsection <FileDisplayOwnerGroup>

in uit:

- displays the file owner & group.


@node <FileDisplayDateTime>, <FileDisplaySize>, <FileDisplayOwnerGroup>, command_name
@subsection <FileDisplayDateTime>

in uit:

- displays the file date & time.


@node <FileDisplaySize>, <FileDisplayMode>, <FileDisplayDateTime>, command_name
@subsection <FileDisplaySize>

in uit:

- displays the file size.


@node <FileDisplayMode>, <FileDisplayFullName>, <FileDisplaySize>, command_name
@subsection <FileDisplayMode>

in uit:

- displays the file mode.


@node <FileDisplayFullName>, <FileSortNextMethod>, <FileDisplayMode>, command_name
@subsection <FileDisplayFullName>

in uit:

- displays the full file name (if possible).


@node <FileSortNextMethod>, <FileSortByName>, <FileDisplayFullName>, command_name
@subsection <FileSortNextMethod>

in uit:

- switches to the next sort method.


@node <FileSortByName>, <FileSortByExtension>, <FileSortNextMethod>, command_name
@subsection <FileSortByName>

in uit:

- sorts the files by name.


@node <FileSortByExtension>, <FileSortBySize>, <FileSortByName>, command_name
@subsection <FileSortByExtension>

in uit:

- sorts the files by extension.


@node <FileSortBySize>, <FileSortByDate>, <FileSortByExtension>, command_name
@subsection <FileSortBySize>

in uit:

- sorts the files by size.


@node <FileSortByDate>, <FileSortByMode>, <FileSortBySize>, command_name
@subsection <FileSortByDate>

in uit:

- sorts the files by date.


@node <FileSortByMode>, <FileSortByOwnerId>, <FileSortByDate>, command_name
@subsection <FileSortByMode>

in uit:

- sorts the files by file mode.


@node <FileSortByOwnerId>, <FileSortByGroupId>, <FileSortByMode>, command_name
@subsection <FileSortByOwnerId>

in uit:

- sorts the files by owner id.


@node <FileSortByGroupId>, <FileSortByOwnerName>, <FileSortByOwnerId>, command_name
@subsection <FileSortByGroupId>

in uit:

- sorts the files by group id.


@node <FileSortByOwnerName>, <FileSortByGroupName>, <FileSortByGroupId>, command_name
@subsection <FileSortByOwnerName>

in uit:

- sorts the files by owner name.


@node <FileSortByGroupName>, <DeleteCmdLn>, <FileSortByOwnerName>, command_name
@subsection <FileSortByGroupName>

in uit:

- sorts the files by group name.


@node <DeleteCmdLn>, <FileSelect>, <FileSortByGroupName>, command_name
@subsection <DeleteCmdLn>

in uit:

- deletes the command line contents.


@node <FileSelect>, <CopyFileToCmdLn>, <DeleteCmdLn>, command_name
@subsection <FileSelect>

in uit:

- selects/unselects files. All the files can be selected by pressing '+' (and
ENTER) or unselected by pressing '-'. By pressing '*' selected files becomes
unselected and unselected files becomes selected.


@node <CopyFileToCmdLn>, <Home>, <FileSelect>, command_name
@subsection <CopyFileToCmdLn>

in uit:

- copies to the command line the current file name.


@node <Home>, <End>, <CopyFileToCmdLn>, command_name
@subsection <Home>

in uit:

- puts the cursor onto the first entry in the current directory list.

in uitps:

- moves to the first process in the processes list.

in uitview:

- moves to the beginning of the file.


@node <End>, <PageUp>, <Home>, command_name
@subsection <End>

in uit:

- puts the cursor onto the last entry in the current directory list.

in uitps:

- moves to the last process in the processes list.

in uitview:

- moves to the end of the file.


@node <PageUp>, <PageDown>, <End>, command_name
@subsection <PageUp>

in uit:

- puts the cursor up one page in the current directory file list.

in uitps:

- moves one page up in the processes list.

in uitview:

- moves one page up (0x100 bytes) in the file.


@node <PageDown>, <CursorLeft>, <PageUp>, command_name
@subsection <PageDown>

in uit:

- puts the cursor down one page in the current directory file list.

in uitps:

- moves one page down in the processes list.

in uitview:

- moves one page down (0x100 bytes) in the file.


@node <CursorLeft>, <CursorRight>, <PageDown>, command_name
@subsection <CursorLeft>

in uit:

- acts like <PageUp>.


@node <CursorRight>, <CursorUp>, <CursorLeft>, command_name
@subsection <CursorRight>

in uit:

- acts like <PageDown>.


@node <CursorUp>, <CursorDown>, <CursorRight>, command_name
@subsection <CursorUp>

in uit:

- puts the cursor up one entry in the current directory file list.

in uitps:

- moves to the previous process in the processes list.

in uitview:

- moves to the previous line (16 bytes) in the file.


@node <CursorDown>, <ChangePanel>, <CursorUp>, command_name
@subsection <CursorDown>

in uit:

- puts the cursor down one entry in the current directory file list.

in uitps:

- moves to the next process in the processes list.

in uitview:

- moves to the next line (16 bytes) in the file.


@node <ChangePanel>, <ChangeDir>, <CursorDown>, command_name
@subsection <ChangePanel>

in uit:

- puts the cursor in the other panel.


@node <ChangeDir>, <HardRefresh>, <ChangePanel>, command_name
@subsection <ChangeDir>

in uit:

- changes the current directory to a user specified directory.


@node <HardRefresh>, <FilePatternSelect>, <ChangeDir>, command_name
@subsection <HardRefresh>

@display
in uit:
in uitps:
in uitview:
@end display

- forces a screen refresh.


@node <FilePatternSelect>, <FilePatternUnselect>, <HardRefresh>, command_name
@subsection <FilePatternSelect>

in uit:

- selects files matching a given pattern.


@node <FilePatternUnselect>, <DeleteCmdLnWord>, <FilePatternSelect>, command_name
@subsection <FilePatternUnselect>

in uit:

- unselects files matching a given pattern.


@node <DeleteCmdLnWord>, <ConformCurrentDir>, <FilePatternUnselect>, command_name
@subsection <DeleteCmdLnWord>

in uit:

- deletes the last command line word.


@node <ConformCurrentDir>, <ConformOtherDir>, <DeleteCmdLnWord>, command_name
@subsection <ConformCurrentDir>

in uit:

- the other panel current directory will become the current directory of
the current panel.


@node <ConformOtherDir>, <CopyPathToCmdLn>, <ConformCurrentDir>, command_name
@subsection <ConformOtherDir>

in uit:

- the current directory of the current panel will become the current
directory of the other panel.


@node <CopyPathToCmdLn>, <CopySelectedFilesToCmdLn>, <ConformOtherDir>, command_name
@subsection <CopyPathToCmdLn>

in uit:

- copy the other panel path to the command line.


@node <CopySelectedFilesToCmdLn>, <NextSignal>, <CopyPathToCmdLn>, command_name
@subsection <CopySelectedFilesToCmdLn>

in uit:

- copy all the currrent panel selected file names to the command line.


@node <NextSignal>, <SIGHUP>, <CopySelectedFilesToCmdLn>, command_name
@subsection <NextSignal>

in uitps:

- sets the next signal in the signals list as the current signal.


@node <SIGHUP>, <SIGINT>, <NextSignal>, command_name
@subsection <SIGHUP>

in uitps:

- sets the SIGHUP signal as the current signal.


@node <SIGINT>, <SIGQUIT>, <SIGHUP>, command_name
@subsection <SIGINT>

in uitps:

- sets the SIGINT signal as the current signal.


@node <SIGQUIT>, <SIGILL>, <SIGINT>, command_name
@subsection <SIGQUIT>

in uitps:

- sets the SIGQUIT signal as the current signal.


@node <SIGILL>, <SIGFPE>, <SIGQUIT>, command_name
@subsection <SIGILL>

in uitps:

- sets the SIGILL signal as the current signal.


@node <SIGFPE>, <SIGKILL>, <SIGILL>, command_name
@subsection <SIGFPE>

in uitps:

- sets the SIGFPE signal as the current signal.


@node <SIGKILL>, <SIGUSR1>, <SIGFPE>, command_name
@subsection <SIGKILL>

in uitps:

- sets the SIGKILL signal as the current signal.


@node <SIGUSR1>, <SIGSEGV>, <SIGKILL>, command_name
@subsection <SIGUSR1>

in uitps:

- sets the SIGUSR1 signal as the current signal.


@node <SIGSEGV>, <SIGUSR2>, <SIGUSR1>, command_name
@subsection <SIGSEGV>

in uitps:

- sets the SIGSEGV signal as the current signal.


@node <SIGUSR2>, <SIGPIPE>, <SIGSEGV>, command_name
@subsection <SIGUSR2>

in uitps:

- sets the SIGUSR2 signal as the current signal.


@node <SIGPIPE>, <SIGALRM>, <SIGUSR2>, command_name
@subsection <SIGPIPE>

in uitps:

- sets the SIGPIPE signal as the current signal.


@node <SIGALRM>, <SIGTERM>, <SIGPIPE>, command_name
@subsection <SIGALRM>

in uitps:

- sets the SIGALRM signal as the current signal.


@node <SIGTERM>, <SIGCHLD>, <SIGALRM>, command_name
@subsection <SIGTERM>

in uitps:

- sets the SIGTERM signal as the current signal.


@node <SIGCHLD>, <SIGCONT>, <SIGTERM>, command_name
@subsection <SIGCHLD>

in uitps:

- sets the SIGCHLD signal as the current signal.


@node <SIGCONT>, <KillProcess>, <SIGCHLD>, command_name
@subsection <SIGCONT>

in uitps:

- sets the SIGCONT signal as the current signal.


@node <KillProcess>, , <SIGCONT>, command_name
@subsection <KillProcess>

in uitps:

- sends the current signal to the current process.


@node formatted_command, new_dir, command_name, Sections [UITxxx-Keys]
@subsection formatted_command

- 'formatted_command' is a shell command which can contain some scanf like
format specifiers. With their help you can get the current directory entry
name (the directory entry under the cursor), owner, group and mode.

Note that using uppercase format specifiers you will be able to access the
other panel path, file and directory names.

These are the available format specifiers:

@menu
* %s::
* %f::
* %d::
* %l::
* %t::
* %z::
* %a::
* %m::
* %g::
* %o::
* %p::
* %b::
* %i::
@end menu


@node %s, %f, , formatted_command
@subsection %s

The format of the %s parameter is:  %s@{question,default_answer@}

When uit encounters a %s in the 'formatted_command' asks the user the question
'question' whose default answer is 'default_answer' and replaces the %s@{ , @}
with the user answer. Both 'question' and 'default_answer' can contain any
other format specifiers except %s.

WARNING: no spaces between %s and '@{'.


@node %f, %d, %s, formatted_command
@subsection %f

uit will replace %f with the current directory entry name only if it is a
file (not a directory).


@node %d, %l, %f, formatted_command
@subsection %d

uit will replace %d with the current directory entry name only if it is a
directory (not a file).


@node %l, %t, %d, formatted_command
@subsection %l

uit will replace %l with the current directory entry name only if it is a
symbolic link.


@node %t, %z, %l, formatted_command
@subsection %t

uit will replace %t with the current directory entry name only if it is a
named pipe.


@node %z, %a, %t, formatted_command
@subsection %z

uit will replace %z with the current directory entry name only if it is a
socket.


@node %a, %m, %z, formatted_command
@subsection %a

uit will always replace %a with the current directory entry name.


@node %m, %g, %a, formatted_command
@subsection %m

uit will always replace %m in the 'formatted_command' with the current file
mode.


@node %g, %o, %m, formatted_command
@subsection %g

uit will always replace %g in the 'formatted_command' with the current file
group.


@node %o, %p, %g, formatted_command
@subsection %o

uit will always replace %o in the 'formatted_command' with the current file
owner.


@node %p, %b, %o, formatted_command
@subsection %p

uit will always replace %p in the formatted_command with the current panel
path.


@node %b, %i, %p, formatted_command
@subsection %b

uit will always replace %b in the 'formatted_command' with the current panel
directory name.


@node %i, , %b, formatted_command
@subsection %i

uit will always replace %i in the 'formatted_command' with all the current
panel selected file names.


@node new_dir, save_screen, formatted_command, Sections [UITxxx-Keys]
@subsection new_dir

- if the 'formatted_command' successfully exits (exit code = 0) and this field
is present then 'new_dir' will become the current panel directory.
The character ~ used at the begining of the new_dir field is replaced by the
user's home directory.


@node save_screen, pause, new_dir, Sections [UITxxx-Keys]
@subsection save_screen

- this field is a character (usually 'y' or 'n') who tells uit to save ('y') or
not to save ('n') the terminal screen after executing the 'formatted_command'.
Saving the screen is not necessary while editing or viewing a file because the
information left after the editor or the viewer exits is not important. Saving
the screen means that that screen will be restored before the execution of the
next command. This field is used only if you are super user under Linux
and you are working on a virtual console. By default this field is 'y'.


@node pause, hide, save_screen, Sections [UITxxx-Keys]
@subsection pause

- for some commands you may wish to read their results before repainting the
panels. If this field is present uit will wait for a key to be pressed before
restoring the panels. By default this field is 'n'.


@node hide, , pause, Sections [UITxxx-Keys]
@subsection hide

- there are some commands that aren't displaying any useful information if
successfully complete their execution: mount, chmod, chown, chgrp, sync ...
and if an error occurs then a line or two are sended to stderr. If this
option is 'y', the stdout and stderr will be redirected to some files
(stdout.pid and stderr.pid, where pid is uit pid) and only if the command
exit code is not 0, the stderr.pid file will be displayed, line by line,
onto the status bar. This way the panels will not be deleted and then 
repainted and the command appears to be built-in. stdout.pid and stderr.pid
are created in the TempDirectory specified in the [Setup] section. By default
this field is 'n'.


@node uit, uitps, Configuration Files, Top
@section uit

uit is a file system browser with some shell facilities which was designed
to make your work much easier and much efficient. uit is made of two panels.
The left one and the right one. Each one contains a file system directory.
You can browse the directory tree with the usual cursor keys and pressing
ENTER when you want to enter or leave a directory. You may change the panels
by pressing TAB.

Under the two panels there is a shell like command line which you can use to
type normal shell commands. The command line supports up to 256 characters
and 512 commands in the history list. UIT uses the GNU history library for
that.

Under the command line there is a status bar. You can see there the status of
the currently executed command, the warnings and errors and you will be
prompted if a decision has to be taken.

@display
@xref{Configuration Files},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitmatch},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitps, uitview, uit, Top
@section uitps

uitps is an interactive process viewer/killer. It calls internally the ps(1)
utility so that's the reason why uitps parameters are in fact ps(1) ones.
Running uitps it is self explanatory. Use the arrows, PageUp, PageDown,
Home, End, ^Y, ^B, ^Ku, ^Kv to move in the list, ^R to refresh it and F10 or
^C to leave. You can change these keys, just read the sections [UITPS-Setup],
[UITPS-Color], [UITPS-Monochrome] and [UITPS-Keys] in the configuration file
.uitrc.TERM.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitmatch},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitview, uitmount, uitps, Top
@section uitview

uitview is an hex/ascii file viewer. Too simple to need a separate manual page.
Use the arrows, PageUp, PageDown, Home, End, ^Y, ^B, ^Ku, ^Kv to move in the
file, ^R to refresh the screen and F10 or ^C to leave. You can change those
keys, just read the sections [UITVIEW-Setup], [UITVIEW-Color],
[UITVIEW-Monochrome] and [UITVIEW-Keys] in the configuration file .uitrc.TERM.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitmatch},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitmount, uitcmp, uitview, Top
@section uitmount

uitmount is a script which allows you to mount any block device without
specifying the file system type. You may now insert the floppy in the
drive and type  'uitmount fd0'  and the first floppy will be mounted in the
directory /mnt/fd0. On Linux just press F11 or F12.
You don't need to know the file system type anymore. The directories /mnt/fd0
and /mnt/fd1 must exist. If you want to use uitmount with the block device
/dev/xxx then the directory /mnt/xxx must exist too.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmatch},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitcmp, uitkeys, uitmount, Top
@section uitcmp

uitcmp is a file compare utility. It outputs to stderr, uit catching its error
messages this way. uitcmp was designed to be used in $HOME/.uitrc.TERM (uit
configuration file) and should not be used as a stand alone program
@xref{hide}.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitmount},
@xref{uitkeys},
@xref{uitmatch},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitkeys, uitmatch, uitcmp, Top
@section uitkeys

uitkeys is a program that displays the key sequence sent by the pressed key. This is the
key sequence received by UIT tools, so this program is useful when setting
up the .uitrc.TERM configuration files.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitmatch},
@xref{uitmount},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitmatch, uitaction, uitkeys, Top
@section uitmatch

uitmatch is a program that tries to match its first parameter (the file name)
against some patterns, returning the number of the pattern that matches.
uitmatch is called by the uitaction/.uitaction scripts and was not designed to
be used as a stand alone program.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitaction},
@xref{.uitaction}.
@end display


@node uitaction, .uitaction, uitmatch, Top
@section uitaction

uitaction is a script that executes a different action for each file type
specified. It is called by the uit program when pressing F2 or ^Kz.
@xref{Configuration Files}.

The first parameter is the current directory name and the second one is the
file name to be matched against the default patterns. The matching is done
using the uitmatch utility. @xref{uitmatch}

If you press F2 or ^Kz on a *.c file, uit will compile it, if you press F2
or ^Kz on a *.tar.gz file, uit will list the tar archive contents, if you
press the same keys on a *.gz file, uit will display its uncompressed
contents on the screen,  etc  ...

By default uitaction checks for the following patterns:

       "*.cc"  "*.c"  "*.l"  "*.y"  "*.h" "*.s" "*.S" "*.o" "*.a"
       "*.sa" "Makefile" "makefile" "*.tar.gz" "*.tgz"  "*.tar.z"
       "*.tar.Z"  "*.taz"  "*.tar"  "*.gz"  "*.z"  "*.Z"  "*.doc"
       "*.txt" "*.gif" "*.jpg" "*.tif" "*.bmp"

and acts as appropriate. If no pattern is found, the file is displayed using
more. Feel free to change this.

If you want to find out what the default action for each file type is (or if
you want to modify it), just read/modify the uitaction script.

If you press F2 or ^Kz on a *.gif file or *.jpg file and you have the zgv
utility installed, you will be able to see it. If you want to change the
gif/jpeg viewer, all you need to do is to change its name in the uitaction
script. I don't know a *.bmp or *.tif viewer. Feel free to add one in the
uitaction script.

The script can be easy enhanced. Just read it.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitmatch},
@xref{.uitaction}.
@end display


@node .uitaction, Starting uit/uitps/uitview/uitmount, uitaction, Top
@section .uitaction


The .uitaction script is a local version of the uitaction script. When started,
uitaction tries to search a script called  .uitaction in the current directory
and, if it finds it, it starts it. If .uitaction's exit code is 0 (.uitaction
couldn't find a matching pattern), uitaction starts its own case statement
trying to match the current file name (the second parameter) against its
default patterns.

The .uitaction script *must* be executable. An example of .uitaction can be
fount in /usr/local/lib. You should copy the example in the current directory
and then modify it.

@display
@xref{Configuration Files},
@xref{uit},
@xref{uitps},
@xref{uitview},
@xref{uitcmp},
@xref{uitkeys},
@xref{uitmount},
@xref{uitmatch},
@xref{uitaction}.
@end display


@node Starting uit/uitps/uitview/uitmount, Canceling Operations, .uitaction, Top
@section Starting uit/uitps/uitview/uitmount


These are the command line parameters supported by the programs in the UIT
package:

@display
       uit
       uitps    [ps(1) like parameters]
       uitview  filename
       uitmount device
@end display


@node Canceling Operations, Limitations, Starting uit/uitps/uitview/uitmount, Top
@section Canceling Operations



Built-in cyclic operations can be stopped by pressing ^C. uit can be suspended
by pressing ^Z.

@xref{command_name}.


@node Limitations, Bugs, Canceling Operations, Top
@section Limitations


1. Background execution is not fully supported. That means you may specify
an & terminated command line in the configuration file but the result of the
background executed command (stdout and stderr redirection, @xref{hide}) will be
overwritten by the result of newer commands and, if an error occurs, you will
not see it.

2. No command line editing is provided. You can only modify the contents of
the command line by appending new characters, deleting them with backspace
or ^H, or deleting the last word with the key sequence associated with
<DeleteCmdLnWord> (@xref{<DeleteCmdLnWord>}). You can also insert the current
file name into the command line using the key sequence associated with
<CopyFileToCmdLn> (@xref{<CopyFileToCmdLn>}) and the other panel path
using the key sequence associated with <CopyPathToCmdLn>
(@xref{<CopyPathToCmdLn>}).

3. When uit is compiled for Linux, the default built-in color descriptions
are for color monitors, so you can't (decently) run uit on a b/w monitor
without the .uitrc.TERM file corectly configured. .uitrc.TERM should be
configured with AnsiColorSequences = OFF.

4. Only POSIX terminals are supported.

5. Job support is implemented only in uit.

6. Due to the fact that the ';' character is used as a field separator in the
configuration files, you can't write something like that in the .uitrc.TERM
files:
^AAA = SHOW-USERS-AND-GROUPS; more /etc/passwd; more /etc/group
because 'more /etc/group' will be considered as a directory to switch to.
You must write a small script instead:

#!/bin/sh

more /etc/passwd
more /etc/group

Supposing the script name is 'show_ug', the .uitrc.TERM line will be like that:

^AAA = SHOW-USERS-AND-GROUPS; show_ug


@node Bugs, Copyright, Limitations, Top
@section Bugs

None so far. :-)


Please send bug reports to

@display
	tudor@@ulise.cs.pub.ro 		or to
	tudor@@habarnam.cs.pub.ro.
@end display


@node Copyright, Authors, Bugs, Top
@section Copyright



@noindent
UIT is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.

@noindent
UIT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details .

@noindent
You should have received a copy of the GNU General Public License along with
UIT; see the file COPYING. If not, write to the Free Software Foundation,
675 Mass Ave, Cambridge, MA 02139, USA.


@node Authors, , Copyright, Top
@section Authors



     Tudor Hulubei, Politechnic University of Bucharest, Romania

@display
                                  tudor@@ulise.cs.pub.ro
                                  tudor@@habarnam.cs.pub.ro
@end display

     Andrei Pitis,  Politechnic University of Bucharest, Romania

@display
                                  pink@@ulise.cs.pub.ro
                                  pink@@habarnam.cs.pub.ro
@end display


@bye
