{"action":"opened","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/893","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/893/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/893/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/893/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/893","id":102987472,"number":893,"title":"Use dotted paths instead of section/option for config values.","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/component:%20config","name":"component: config","color":"5319e7"},{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/style","name":"style","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/milestones/7","html_url":"https://github.com/The-Compiler/qutebrowser/milestones/config%20revolution","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/milestones/7/labels","id":1166227,"number":7,"title":"config revolution","description":"","creator":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2015-06-16T06:45:24Z","updated_at":"2015-08-25T09:33:28Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-25T09:33:28Z","updated_at":"2015-08-25T09:33:28Z","closed_at":null,"body":"I think this was originally suggested by @Carpetsmoker but I'd like some more opinions on this.\r\n\r\nWhat about using dotted option names instead of the current distinction between sections/options? Some examples:\r\n\r\n* `:set general private-browsing true` -> `:set general.private-browsing true`\r\n* `:set colors completion.item.selected.bg` -> `:set colors.completion.item.selected.bg`\r\n\r\nAdvantages:\r\n\r\n* Probably makes some commands and code easier as it's only one argument instead of two.\r\n* The completion for `:set` shows (and allows the user to filter) all options in all sections (though code could be added to do the same even with the current section/option scheme).\r\n\r\nDisadvantages:\r\n\r\n* Makes some code more complicated where it's interested in e.g. all config changes of a given section.\r\n* The completion for `:set` might show too much, and it's not nicely grouped in categories.\r\n* More config breakage\r\n\r\nIn YAML config files (which will be one way to write the config), those dotted elements could be handled as children:\r\n\r\n```yaml\r\n- settings\r\n  general:\r\n    private-browsing: true\r\n  colors:\r\n    completion:\r\n      fg: white\r\n      bg: #333333\r\n      category:\r\n        fg: white\r\n        bg: ...\r\n        border:\r\n          top: black\r\n          bottom: black\r\n      item:\r\n        selected:\r\n          bg: #e8c000\r\n          fg: black\r\n          border:\r\n            top: #bbbb00\r\n            bottom: #bbbb00\r\n    statusbar:\r\n      fg: white\r\n      bg: black\r\n      error:\r\n        fg: white\r\n        error: red\r\n```\r\n\r\nNote some options which have a value *and* children will need to be renamed (e.g. `statusbar.fg.error` because `statusbar.fg` has a value as well).\r\n"}}