Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | helix-term/src/commands/typed.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 49864abb..4c5d568a 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<str>], 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: {:?}", |