From 088d8e5455b6a9ffdaa8680441b977f8dea8dcde Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 20 Feb 2021 10:53:29 -0800 Subject: [PATCH] docs: note about config being a "pure function" closes: #477 --- docs/config/files.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/config/files.md b/docs/config/files.md index 5278ffe5d..637380e16 100644 --- a/docs/config/files.md +++ b/docs/config/files.md @@ -21,6 +21,13 @@ configuration will be automatically reloaded and the majority of options will take effect immediately. You may also use the `CTRL+SHIFT+R` keyboard shortcut to force the configuration to be reloaded. +**The configuration file may be evaluated multiple times for each wezterm +process** both at startup and in response to the configuration file being +reloaded. You should avoid taking actions in the main flow of the config file +that have side effects; for example, unconditionally launching background +processes can result in many of them being spawned over time if you launch +many copies of wezterm, or are frequently reloading your config file. + ## Configuration File Structure The `wezterm.lua` configuration file is a lua script which allows for a high