fix(cli): use provided session-name (#1793)

This commit is contained in:
Aram Drevekenin 2022-10-12 15:35:19 +02:00 committed by GitHub
parent 2c5b2784ba
commit ad93a14000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,10 +107,12 @@ pub struct Options {
#[clap(long, value_parser)]
pub scrollback_editor: Option<PathBuf>,
/// The name of the session to create when starting Zellij
#[clap(long, value_parser)]
#[serde(default)]
pub session_name: Option<String>,
/// Whether to attach to a session specified in "session-name" if it exists
#[clap(long, value_parser)]
#[serde(default)]
pub attach_to_session: Option<bool>,
@ -310,6 +312,8 @@ impl From<CliOptions> for Options {
copy_clipboard: opts.copy_clipboard,
copy_on_select: opts.copy_on_select,
scrollback_editor: opts.scrollback_editor,
session_name: opts.session_name,
attach_to_session: opts.attach_to_session,
..Default::default()
}
}