Eskil

Artifact [4a3f72136a]
Login

Artifact 4a3f72136a3705ed3c7fc0a8dd96aa76db2192909fdc228c260b1b481e88972f:


Eskil provides a plugin system where plugins can preprocess data
before being compared and displayed.

A plugin is a Tcl script that must follow a specific format.
Example plugins are included in the kit.
Dump one of the included plugins to see what it looks like.

When searching for a plugin "x", files "x" and "x.tcl" will
match. The search path is current directory, "plugins" directory,
the directory where Eskil is installed, "plugins" directory where
Eskil is installed, and also the internal "plugins" wrapped into Eskil.

The command line options for plugins are:
  -plugin plugin     : Use plugin
  -plugininfo info   : Pass info to plugin (plugin specific)
  -plugindump plugin : Dump plugin source to stdout
  -pluginlist        : List known plugins
  -pluginallow       : Allow full access privilege for a plugin.

A plugin may further define command line options that it accepts.
A way to see the plugin's options is to do:
eskil -plugin <plg> -help

Multiple -plugin may be given and they will be applied in the given
order. Any -plugininfo and -pluginallow belongs to the last -plugin
before them.

The plugin is executed in a safe interpreter and thus cannot do any
damage. You can turn this safety off with -pluginallow.

A plugin is set up with these global variables filled in:
::WhoAmI     : The name of the plugin
::WhoAmIFull : The full path to the plugin source
::Info       : The contents of -plugininfo parameter
::Pref       : A copy if Eskil's internal preferences array.
::File(left) : The name of the left file processed
::File(right): The name of the right file processed
::argv       : A copy of the command line from Eskil's invocation

A plugin may give a result that has a line-by-line correspondence to
the original, in which case the preprocessed data is used for comparing
while the original is used for displaying.  The main plugin procedure
should return 0 to signify this case.

If the plugin procedure returns 1, the processed data is used also for
displaying.


Directory diff only supports one plugin. The first plugin with FileCompare
defined will be used.