Next: , Previous: Input/Output, Up: Top

6 Extension modules

Eshell provides a facility for defining extension modules so that they can be disabled and enabled without having to unload and reload them, and to provide a common parent Customize group for the modules.1 An Eshell module is defined the same as any other library but one requirement: the module must define a Customize2 group using eshell-defgroup (in place of defgroup) with eshell-module as the parent group.3 You also need to load the following as shown:

     (eval-when-compile
       (require 'cl)
       (require 'esh-mode)
       (require 'eshell))
     
     (require 'esh-util)

Footnotes

[1] ERC provides a similar module facility.

[2] See Customization.

[3] If the module has no user-customizable options, then there is no need to define it as an Eshell module.