Settings - greywolf001au/termhelper GitHub Wiki

Settings for Termhelper can be changed either by editing termhelper.lib.js file in the termhelper root directory.

The settings file has comments for each option stating how it will change Termhelpers behaviour and the values recognised.

As I regularly update this module it is advised to not use the lib file to edit settings but should be used to get an understanding of each available option.

I have also put this information in the README.md file for your reference.

The recommended method for changing settings is to use the provided set function to pass an object containing the settings you wish to change. Currently this must be done for each category i.e. settings, log, etc.

Future versions will allow a single object to be passed containing multiple categories.

The following code shows how to pass an object using the set method:

term.set('settings', {
  prompt: "myapp 0.0.1> ",
})

You may also toggle individual settings in the following manner:

term.set('settings', 'debug', true)

Changing settings in this manner will allow your application to be installed from NPM without having to upload Termhelper, ensure that updated versions of Termhelper have any new settings in the lib file that are required to function and saves the need for editing the lib should you update the Termhelper module.

Contents | [Next](Debug Mode)