GAP in color

This webpage explains how you can run GAP from the command line with colored fonts (the GAP prompt is blue, GAP command is red, output is black):

gap> 2+3;
5

It appears that colors.gap does not work in GAP installed on a debian linux machine using apt-get install gap. It does work on a suse linux (and presumably other flavors of linux with GAP compiled from source) machine using the shell script gap.sh. However, it appears that colors.gap does not work on a linux machine if GAP is started inside emacs.

According to Gary Zablackis, colors.gap works in Windows using gap.bat. Also, if you have cygwin installed if you start the cygwin emacs (but not in gap mode) and start GAP by typing

    M-x shell
    gap
then colors.gap works. (GAP is not running in gap mode, so that function completion and help do not display in the emacs *Completions* and *Help* windows, respectively.)
  1. Download the colors.gap file and save to your computer, say in PATH/colors.gap.
  2. Add the line

    Read("PATH/colors.gap")

    to your .gaprc file.

The next time you start GAP it will be in color.

The colors.gap file was written by Frank Luebeck with some minor modifications by Marco Constantini. See also the Forum email on this topic and the link there to the very similar file colorprompt.g.


wdj@usna.edu

Last updated 3-14-2005.

This page is at the url: http://cadigweb.ew.usna.edu/~wdj/gap/gap_color.html