Common configuration options for Zoidberg

All configuration is divided between three hashes in Zoidberg.pm, each having their own file to save to. By default these files are found in ~/.zoid/ .

{core}

This hash stores config variables that are of immidiated influence on the Zoidberg parent object. It is default saved to core.pd .

in this hash there are:

{core}{init_objects} Plugins to be loaded at initialisation. Entries of the form $zoidname => [$class, [@args], $code], where $zoidname is arbitrary*, $class is the perl class, @ars are init args if plugin uses base class Zoidberg::Fish, else it are constructor args, and $code is post_init evalled (for non-standard initialisations).

*) Some zoidnames like Buffer, Prompt, History, Intel and Commands are reserved. These should on runtime be defined in {core}{core_objects} and are provided with stub replacements.

{core}{show_naked_zoid} Don't shield parent object, used for debugging or serious hacking only.

{core}{cache_time} Time items (for example dir contents) are kept in cache. Tune this one for the right balance between speed and memory size.

{core}{no_regex} Do not use regex at all in expansion - this results in using (some kind of) globbing instead.

{core}{strict_regex} Do not use globbing at all in expansion - everything must be pure regex.

If both of the above expansion options are false this results in a kind of non-strict regex. This means that for example a '*' will sometimes be interpreted as a glob and sometimes as regex, this mode is also known as the "type less chars" modus.

For now it is adviced to use strict regex when handling sensitive data -- this is the only way to be sure of the result.

{config}

This hash contains config trees for the plugins which use the Zoidberg::Fish base class. It is default saved to profile.pd .

The key to store a config should be the same as the zoidname of the plugin. In theory each plugin uses a ref to this hash so after deleting the object the config remains for later use.

{grammar}

In this hash houses some black magick. It contains all kinds of regexes and code strings used by diverse parsers throughout Zoidberg. If you want to changes the meaning of "&&" or would like to implement a new context, this is the place to look. It is by default stored in grammar.pd .

Most important parts are:

{grammar}{context} Defines non-built-in contexts

{grammar}{script_gram} Used to parse logic blocks.

{grammar}{pipe_gram} Used to parse pipes and redirections.

{grammar}{space_gram} Used to parse "shell-style" command options.

{grammar}{syntax} Defines grammars for the syntax highlighting per context.