rlx-settings(3) -- settings commands
====================================

## SYNOPSIS

Commands for modifying settings used to configure runtime behaviour.

## COMMANDS

* `settings`:

Print all settings.

* `settings get [key...]`:

Print setting(s), if no key is specified all settings are printed.

* `settings set [key] [value]`:

Set a setting, both key and value must be specified.

* `settings save`:

Save current settings to the rc file, see `RC FILE`.

* `settings load`:

Load settings from the rc file, see `RC FILE`.

* `settings print`:

Print the contents of the rc file, see `RC FILE`.

* `settings defaults`:

Print the default settings.

* `settings reset [key...]`:

Reset all settings to their default values if no options are specified otherwise only reset the named keys to their defaults values.

### Shortcut Commands

These commands are provided as a convenience for frequently used settings or to set multiple settings with a single command.

* `lang [lang] [template]`:

Sets the primary language and template language. If no options are specified this prints the `lang` and `templatelang` settings. If the *template* option is not specified the value of *lang* is used.

* `verbose [on|off]`:

Alias for the *verbose* setting.

* `network [on|off]`:

Alias for the *network* setting.

* `debug [on|off]`:

Alias for the *debug* setting.

* `headers [on|off]`:

Toggle display of HTTP headers, alias for the *reqheaders* and *resheaders* settings.

* `progress [on|off]`:

Alias for the *progress* setting which determines whether file transfer progress is printed.

* `pager [on|off]`:

Alias for the *usepager* setting.

* `color [on|off]`:

Alias for the *color* and *hilite* settings.

* `hilite`:

Switch to the default values for highlighting using `source-highlight`.

* `pygments`:

Switch to the default values for highlighting using `pygmentize`.

### Settings

List of available settings organized by category.

### Connection Settings

* `server` The server to connect to by default.

* `database` The database to use by default. When this setting exists rlx(1) will attempt to `use` the database at start up. To disable set this to `false`.

### Language Settings

* `lang` The language to use when pretty printing JSON must be either *perl*, *python*, *node* or *false*. When the *false* value is used then JSON documents are not pretty printed.

* `templatelang` The language to use for template parsing. When the *false* value is used then created documents are the empty object *{}* and templates are disabled.

### Output Settings

* `verbose` Print more information.

* `network` A boolean indicating whether the URLs for network requests are printed.

* `debug` A boolean indicating whether debugging information is printed.

* `reqheaders` A boolean indicating whether HTTP request headers are printed.

* `resheaders` A boolean indicating whether HTTP response headers are printed.

* `progress` A boolean that determines whether file transfer progress is shown.

* `color` A boolean that indicates whether color is used for console output, this does not affect highlighting of JSON documents.

### External Commands

* `editor` The command to execute when editing documents, the editor must be able to read from stdin.

* `editopts` The options to pass to the `editor` command. This value must contain a single `%s` which will be replaced with the path to the file being edited. Options are delimited by a newline to allow spaces in the path for the file being edited.

* `pager` A program to pipe JSON documents to when `usepager` is true.

* `browser` The command to execute to launch a browser. This setting must contain a single `%s` which is replaced with the URL being launched, if the browser command is not in PATH or the command string does not contain `%s` no browser is launched.

### View Query Settings

Settings used when querying views.

* `limit` An integer (greater than zero) specifying the limit to use when querying views. Corresponds to the *limit* query string parameter.

* `descending` A boolean indicating the direction when querying views. Corresponds to the `descending` query string parameter.

### Filesystem Settings

* `downloads` The directory used for documents saved to disc using the `save` command when an absolute file path is not specified.

* `attachments` The directory used for attachment downloads.

* `templates` A directory to search for templates preferred over the system templates, set this to false to only search the system templates directory.

* `dotglob` Include hidden files in glob patterns.

### Syntax Settings

Settings that alter the syntax highlighting or indentation:

* `tabstops` The number of spaces to use when pretty printing JSON, must be an integer.

* `savepretty` A boolean indicating whether documents being saved are indented before being saved. Set this to `false` to save documents in a compact format.

* `hilite` The command to execute to highlight a JSON document, set this to `false` to disable highlighting.

* `hiliteopts` The options to pass to the `hilite` command.

* `shstyle` The style definition file that is used when invoking `source-highlight`. By default this will point to the bundled style definition.

* `shlang` The language definition files that is used when invoking `source-highlight`. By default this will point to the bundled language definition.

### Template Settings

When specifying template identifiers no file extension is required.

* `tpldoc` The identifier for the template used when creating a new document.

* `tplrepl` The identifier for the template used when creating a new replication document.

* `tplreplfilter` The identifier for the template used when creating a filtered replication.

* `tplrepldocs` The identifier for the template used when creating a replication that uses specific document identifiers.

### HTTP Settings

* `timeout` The timeout value in seconds for creating HTTP connections, the default value is 5. This is equivalent to the curl(1) option `--connect-timeout`, set to zero to disable use of this option when invoking curl(1). You may need to increase the value for this setting if you are experiencing network connectivity problems.

### Miscellaneous Settings

* `userns` A namespace used for document ids when modifiying a user database. Do not specify a trailing colon it is automatically concatenated with the username. You may set this to `false` to prevent the use of a namespace.

* `usepager` A boolean indicating whether JSON documents are piped to the `pager` program.

* `lint` A boolean indicating whether JSON documents are tested for validity before sending to the server.

* `mime` The MIME type to use for attachments when a mime type could not be determined using file(1).

## ENVIRONMENT

Settings are stored as environment variables in the `RC FILE`, it is recommended that you use the `settings` commands to set these but you may edit the file manually if you prefer.

All settings may be configured as environment variables by prefixing the setting name with *rlx* concatenated with an underscore, for example:

	export rlx_verbose=true;
	export rlx_color=false;
	export rlx_hilite=false;

To enable verbose mode by default and switch off all highlighting.

## FILES

### RC FILE

Settings are stored and read from `${rlx_home}/rlxrc`.

## BUGS

**rlx** is written in bash and depends upon `bash >= 4.2`.

## COPYRIGHT

**rlx** is copyright (c) 2013 muji <http://xpm.io>

## SEE ALSO

rlx(1), couchdb(3), rlx-page(3)
