Skip to content

Commit

Permalink
fix(cli): use provided session-name (#1793)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif committed Oct 12, 2022
1 parent 2c5b278 commit ad93a14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zellij-utils/src/input/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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()
}
}
Expand Down

0 comments on commit ad93a14

Please sign in to comment.