diff --git a/zellij-server/src/pty.rs b/zellij-server/src/pty.rs index b18be108..790e3913 100644 --- a/zellij-server/src/pty.rs +++ b/zellij-server/src/pty.rs @@ -751,7 +751,7 @@ fn send_command_not_found_to_screen( senders .send_to_screen(ScreenInstruction::PtyBytes( terminal_id, - format!("Command not found: {}", run_command.command.display()) + format!("Command not found: {}\n\rIf you were including arguments as part of the command, try including them as 'args' instead.", run_command.command.display()) .as_bytes() .to_vec(), )) diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs index e5acc0d2..edfcd713 100644 --- a/zellij-utils/src/input/actions.rs +++ b/zellij-utils/src/input/actions.rs @@ -295,12 +295,20 @@ impl Action { file, line_number, floating, - } => Ok(vec![Action::EditFile( - file, - line_number, - direction, - floating, - )]), + } => { + let mut file = file; + if file.is_relative() { + if let Some(cwd) = std::env::current_dir().ok() { + file = cwd.join(file); + } + } + Ok(vec![Action::EditFile( + file, + line_number, + direction, + floating, + )]) + }, CliAction::SwitchMode { input_mode } => { Ok(vec![Action::SwitchModeForAllClients(input_mode)]) },