uitaction(1)

NAME
uitaction - UNIX Interactive Tools version 4.3.1 - per file type action script

SYNTAX
uitaction directory, file
.uitaction directory, file

DESCRIPTION
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 (see the .uitrc.TERM configuration files in the uit manual). 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. 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. 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.

BUGS
None so far. :-) Please send bug reports to tudor@ulise.cs.pub.ro or to tudor@habarnam.cs.pub.ro.

SEE ALSO
uit(1) uitps(1) uitview(1) uitmount(1) uitcmp(1) uitkeys(1) uitmatch(1)

FILES
/usr/local/bin/uitaction
/usr/local/lib/.uitaction
/usr/local/man/man1/uitaction.1

AUTHORS
Tudor Hulubei
- tudor@ulise.cs.pub.ro, tudor@habarnam.cs.pub.ro
Andrei Pitis
- pink@ulise.cs.pub.ro, pink@habarnam.cs.pub.ro
Politechnic University of Bucharest
Romania