From df55eaae69d0388de26448e82f9ded483fca2f44 Mon Sep 17 00:00:00 2001 From: Matt W Date: Thu, 23 Sep 2021 19:21:04 -0700 Subject: Add tilde expansion for file opening (#782) * change to helix_core's tilde expansion, from helix-core::path::expand_tilde--- helix-term/src/commands.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'helix-term/src') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 025639a5..26f599bd 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1524,8 +1524,11 @@ mod cmd { args: &[&str], _event: PromptEvent, ) -> anyhow::Result<()> { + use helix_core::path::expand_tilde; let path = args.get(0).context("wrong argument count")?; - let _ = cx.editor.open(path.into(), Action::Replace)?; + let _ = cx + .editor + .open(expand_tilde(Path::new(path)), Action::Replace)?; Ok(()) } -- cgit v1.2.3-70-g09d2