on master help sign in
Expand `~` when parsing file paths in `:open` (#5329)
commit6c9541148873ff5350bf082ace3b04f2efe52dcd authoriobtl <59901837+iobtl@users.noreply.github.com> dateFri 30 Dec 2022, 00:13 (4 years ago) parent9d15b85
1 file changed+1
helix-term/src/commands/typed.rs+1
helix-term/src/commands/typed.rs+1
@@ -65,6 +65,7 @@ fn open(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) ->
6565 ensure!(!args.is_empty(), "wrong argument count");
6666 for arg in args {
6767 let (path, pos) = args::parse_file(arg);
68+ let path = helix_core::path::expand_tilde(&path);
6869 // If the path is a directory, open a file picker on that directory and update the status
6970 // message
7071 if let Ok(true) = std::fs::canonicalize(&path).map(|p| p.is_dir()) {