on master help sign in
Add tilde expansion for file opening (#782)

* change to helix_core's tilde expansion, from helix-core::path::expand_tilde

commitdf55eaae69d0388de26448e82f9ded483fca2f44 authorMatt W <hellmitre@gmail.com> dateThu 23 Sep 2021, 19:21 (5 years ago) parent2e0803c
1 file changed+4−1
helix-term/src/commands.rs+4−1
helix-term/src/commands.rs+4−1
@@ -1524,8 +1524,11 @@ mod cmd {
15241524 args: &[&str],
15251525 _event: PromptEvent,
15261526 ) -> anyhow::Result<()> {
1527+ use helix_core::path::expand_tilde;
15271528 let path = args.get(0).context("wrong argument count")?;
1528− let _ = cx.editor.open(path.into(), Action::Replace)?;
1529+ let _ = cx
1530+ .editor
1531+ .open(expand_tilde(Path::new(path)), Action::Replace)?;
15291532 Ok(())
15301533 }
15311534