config: add ‘include’ directive

This allows you to include sub-configurations. For example, theme
files.

The ‘include’ directive is a top-level keyword. I.e. it cannot be used
inside sections.

* The included file must be specified with an absolute path
* The included file is parsed in its own scope
* Nested includes are allowed
* Multiple include directives are allowed

Closes #555
This commit is contained in:
Daniel Eklöf 2021-05-28 17:44:13 +02:00
parent 8262c1f0c2
commit 9055d3d921
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 67 additions and 19 deletions

View file

@ -53,6 +53,8 @@
unavailable) (https://codeberg.org/dnkl/foot/issues/487).
* `ctrl`+`c` as a default key binding; to cancel search/url mode.
* `${window-title}` to `notify`.
* Support for including files in `foot.ini`
(https://codeberg.org/dnkl/foot/issues/555).
### Changed