1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-11-06 22:44:18 -05:00

Add parameters to msg create-window subcommand

Alacritty's `msg create-window` subcommand would previously inherit all
the CLI parameters from the original executable. However not only could
this lead to unexpected behavior, it also prevents multi-window users
from making use of parameters like `-e`, `--working-directory`, or
`--hold`.

This is solved by adding a JSON-based message format to the IPC socket
messages which instructs the Alacritty server on which CLI parameters
should be used to create the new window.

Fixes #5562.
Fixes #5561.
Fixes #5560.
This commit is contained in:
Kirill Chibisov 2021-11-22 21:34:09 +03:00 committed by GitHub
parent c89939b5d1
commit 8681f71084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 474 additions and 357 deletions

View file

@ -6,7 +6,7 @@ use std::io::Read;
use std::path::Path;
use alacritty_terminal::ansi;
use alacritty_terminal::config::MockConfig;
use alacritty_terminal::config::Config;
use alacritty_terminal::event::{Event, EventListener};
use alacritty_terminal::grid::{Dimensions, Grid};
use alacritty_terminal::index::{Column, Line};
@ -101,7 +101,7 @@ fn ref_test(dir: &Path) {
let grid: Grid<Cell> = json::from_str(&serialized_grid).unwrap();
let ref_config: RefConfig = json::from_str(&serialized_cfg).unwrap();
let mut config = MockConfig::default();
let mut config = Config::default();
config.scrolling.set_history(ref_config.history_size);
let mut terminal = Term::new(&config, size, Mock);