aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/options.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-12-20 17:31:07 +0100
committerGitHub <noreply@github.com>2021-12-20 17:31:07 +0100
commitca8438b0aa0e5e9aa1c69f0217c275d20f269a8f (patch)
tree97ee4922eb41415d54d3cb183ad9dbef66bd7186 /zellij-utils/src/input/options.rs
parentchore(release): v0.22.1 (diff)
downloadsl0ppij-ca8438b0aa0e5e9aa1c69f0217c275d20f269a8f.tar.gz
sl0ppij-ca8438b0aa0e5e9aa1c69f0217c275d20f269a8f.tar.xz
sl0ppij-ca8438b0aa0e5e9aa1c69f0217c275d20f269a8f.zip
feat(collaboration): implement multiple users (#957)
* work * feat(collaboration): implement multiple users * style(cleanup): some leftovers
Diffstat (limited to 'zellij-utils/src/input/options.rs')
-rw-r--r--zellij-utils/src/input/options.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/zellij-utils/src/input/options.rs b/zellij-utils/src/input/options.rs
index 55036069..e0a38946 100644
--- a/zellij-utils/src/input/options.rs
+++ b/zellij-utils/src/input/options.rs
@@ -65,6 +65,10 @@ pub struct Options {
#[serde(default)]
/// Set display of the pane frames (true or false)
pub pane_frames: Option<bool>,
+ #[structopt(long)]
+ #[serde(default)]
+ /// Mirror session when multiple users are connected (true or false)
+ pub mirror_session: Option<bool>,
/// Set behaviour on force close (quit or detach)
#[structopt(long)]
pub on_force_close: Option<OnForceClose>,
@@ -85,6 +89,7 @@ impl Options {
pub fn merge(&self, other: Options) -> Options {
let mouse_mode = other.mouse_mode.or(self.mouse_mode);
let pane_frames = other.pane_frames.or(self.pane_frames);
+ let mirror_session = other.mirror_session.or(self.mirror_session);
let simplified_ui = other.simplified_ui.or(self.simplified_ui);
let default_mode = other.default_mode.or(self.default_mode);
let default_shell = other.default_shell.or_else(|| self.default_shell.clone());
@@ -100,6 +105,7 @@ impl Options {
layout_dir,
mouse_mode,
pane_frames,
+ mirror_session,
on_force_close,
}
}
@@ -122,6 +128,7 @@ impl Options {
let simplified_ui = merge_bool(other.simplified_ui, self.simplified_ui);
let mouse_mode = merge_bool(other.mouse_mode, self.mouse_mode);
let pane_frames = merge_bool(other.pane_frames, self.pane_frames);
+ let mirror_session = merge_bool(other.mirror_session, self.mirror_session);
let default_mode = other.default_mode.or(self.default_mode);
let default_shell = other.default_shell.or_else(|| self.default_shell.clone());
@@ -137,6 +144,7 @@ impl Options {
layout_dir,
mouse_mode,
pane_frames,
+ mirror_session,
on_force_close,
}
}
@@ -183,6 +191,7 @@ impl From<CliOptions> for Options {
layout_dir: opts.layout_dir,
mouse_mode: opts.mouse_mode,
pane_frames: opts.pane_frames,
+ mirror_session: opts.mirror_session,
on_force_close: opts.on_force_close,
}
}