diff options
author | Christian Duerr <contact@christianduerr.com> | 2023-11-08 07:03:24 +0100 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2023-11-11 20:33:06 +0100 |
commit | 2f097dac5c78a01bdb020c982a09867b3213a69b (patch) | |
tree | f751637a5d4eff5a151273b3bbc7c083d2ed8fc5 /alacritty/src/config | |
parent | 683b5a2cb47579560ed272dc1a4818507dbd30c7 (diff) | |
download | r-alacritty-2f097dac5c78a01bdb020c982a09867b3213a69b.tar.gz r-alacritty-2f097dac5c78a01bdb020c982a09867b3213a69b.tar.bz2 r-alacritty-2f097dac5c78a01bdb020c982a09867b3213a69b.zip |
Add `--option` argument to `create-window`
This patch adds a new CLI parameter to the `create-window` subcommand,
matching the existing `--option` parameter when creating a new Alacritty
instance.
This parameter allows setting up the initial window configuration from
the CLI without having to call `alacritty msg config`, making sure that
all options are set appropriately right from the start.
Closes #6238.
Diffstat (limited to 'alacritty/src/config')
-rw-r--r-- | alacritty/src/config/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 9640147d..95a1ff00 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -126,7 +126,7 @@ impl From<YamlError> for Error { } /// Load the configuration file. -pub fn load(options: &Options) -> UiConfig { +pub fn load(options: &mut Options) -> UiConfig { let config_path = options .config_file .clone() @@ -155,7 +155,7 @@ pub fn load(options: &Options) -> UiConfig { } /// Attempt to reload the configuration file. -pub fn reload(config_path: &Path, options: &Options) -> Result<UiConfig> { +pub fn reload(config_path: &Path, options: &mut Options) -> Result<UiConfig> { debug!("Reloading configuration file: {:?}", config_path); // Load config, propagating errors. @@ -167,7 +167,7 @@ pub fn reload(config_path: &Path, options: &Options) -> Result<UiConfig> { } /// Modifications after the `UiConfig` object is created. -fn after_loading(config: &mut UiConfig, options: &Options) { +fn after_loading(config: &mut UiConfig, options: &mut Options) { // Override config with CLI options. options.override_config(config); |