Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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