aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authoriobtl2022-12-29 16:13:06 +0000
committerGitHub2022-12-29 16:13:06 +0000
commit6c9541148873ff5350bf082ace3b04f2efe52dcd (patch)
tree8defa0fdb36d657e5252e01ee7c2c4970d717949 /helix-term/src
parent9d15b852093480d852e47dd9f0157828c2130298 (diff)
Expand `~` when parsing file paths in `:open` (#5329)
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/typed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index c2ca1a47..5c0cd654 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -65,6 +65,7 @@ fn open(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) ->
ensure!(!args.is_empty(), "wrong argument count");
for arg in args {
let (path, pos) = args::parse_file(arg);
+ let path = helix_core::path::expand_tilde(&path);
// If the path is a directory, open a file picker on that directory and update the status
// message
if let Ok(true) = std::fs::canonicalize(&path).map(|p| p.is_dir()) {