Fix #2463: explain how to set settings with literal dots in their key names

This commit is contained in:
Oliver Blanthorn 2020-06-08 14:28:19 +01:00
parent 4250bcc45c
commit 5c41415378
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 7 additions and 0 deletions

View file

@ -3374,6 +3374,8 @@ export function seturl(pattern: string, key: string, ...values: string[]) {
If no value is given, the value of the of the key will be displayed.
If the setting you are changing has a dot or period character (.) in it, it cannot be set with `:set` directly. You must either use a helper command for that specific setting - e.g. [[seturl]] or [[autocontain]], or you must use Tridactyl's JavaScript API with `:js tri.config.set("path", "to", "key", "value")` to set `{path: {to: {key: value}}}`.
See also: [[unset]]
*/
//#background

View file

@ -13,6 +13,8 @@
*
* We very strongly recommend that you pretty much ignore this page and instead follow the link below DEFAULTS that will take you to our own source code which is formatted in a marginally more sane fashion.
*
* Intrepid Tridactyl users: this page is how Tridactyl arranges and manages its settings internally. To view your own settings, use `:viewconfig` and `:viewconfig --user`. To understand how to set settings, see `:help set`.
*
*/
import * as R from "ramda"
import * as binding from "@src/lib/binding"
@ -59,6 +61,9 @@ export type LoggingLevel = "never" | "error" | "warning" | "info" | "debug"
* This is the default configuration that Tridactyl comes with.
*
* You can change anything here using `set key1.key2.key3 value` or specific things any of the various helper commands such as `bind` or `command`. You can also jump to the help section of a setting using `:help $settingname`. Some of the settings have an input field containing their current value. You can modify these values and save them by pressing `<Enter>` but using `:set $setting $value` is a good habit to take as it doesn't force you to leave the page you're visiting to change your settings.
*
* If the setting you are changing has a dot or period character (.) in it, it cannot be set with `:set` directly. You must either use a helper command for that specific setting - e.g. `:seturl` or `:autocontain`, or you must use Tridactyl's JavaScript API with `:js tri.config.set("path", "to", "key", "value")` to set `{path: {to: {key: value}}}`.
*
*/
export class default_config {
/**