diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 49864abb6..4c5d568aa 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -2507,7 +2507,8 @@ fn read(cx: &mut compositor::Context, args: &[Cow], event: PromptEvent) -> ensure!(args.len() == 1, "only the file name is expected"); let filename = args.first().unwrap(); - let path = PathBuf::from(filename.to_string()); + let path = helix_stdx::path::expand_tilde(PathBuf::from(filename.to_string())); + ensure!( path.exists() && path.is_file(), "path is not a file: {:?}",