Go to the first, previous, next, last section, table of contents.

gitaction

gitaction is a script that executes a different action for each file type specified. It is called by the git program when pressing F2 or ^Xa. See section 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 gitmatch utility. See section gitmatch

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

By default gitaction 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 gitaction script.

If you press F2 or ^Xa 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 gitaction script. I don't know a *.bmp or *.tif viewer. Feel free to add one in the gitaction script.

The script can be easy enhanced. Just read it.

See section Configuration Files,
See section git,
See section gitps,
See section gitview,
See section gitcmp,
See section gitkeys,
See section gitmount,
See section gitredir,
See section gitmatch,
See section .gitaction.

Go to the first, previous, next, last section, table of contents.