diff options
| author | Aram Drevekenin <aram@poor.dev> | 2022-11-16 16:25:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 16:25:01 +0100 |
| commit | cc3ac25c74284d3ad834180891fc072502548c74 (patch) | |
| tree | 22d689cdf971566dd60bf609131496c087782d08 /src | |
| parent | docs(changelog): add catppuccin themes (diff) | |
| download | sl0ppij-cc3ac25c74284d3ad834180891fc072502548c74.tar.gz sl0ppij-cc3ac25c74284d3ad834180891fc072502548c74.tar.xz sl0ppij-cc3ac25c74284d3ad834180891fc072502548c74.zip | |
fix(cli): measure cwd from cli client rather than the zellij server (#1947)
* fix(cli): measure cwd from cli client rather than the zellij server
* style(fmt): rustfmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands.rs b/src/commands.rs index 5f93295a..93ea21fd 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -238,7 +238,8 @@ pub(crate) fn convert_old_theme_file(old_theme_file: PathBuf) { fn attach_with_cli_client(cli_action: zellij_utils::cli::CliAction, session_name: &str) { let os_input = get_os_input(zellij_client::os_input_output::get_cli_client_os_input); - match Action::actions_from_cli(cli_action) { + let get_current_dir = || std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")); + match Action::actions_from_cli(cli_action, Box::new(get_current_dir)) { Ok(actions) => { zellij_client::cli_client::start_cli_client(Box::new(os_input), session_name, actions); std::process::exit(0); |
