on master help sign in
Add tilde expansion for file opening (#782)
df55eaaMatt W
helix-term/src/commands.rs+4−1
@@ -1524,8 +1524,11 @@ mod cmd {
1524 args: &[&str],
1524 args: &[&str],
1525 _event: PromptEvent,
1525 _event: PromptEvent,
1526 ) -> anyhow::Result<()> {
1526 ) -> anyhow::Result<()> {
1527+ use helix_core::path::expand_tilde;
1527 let path = args.get(0).context("wrong argument count")?;
1528 let path = args.get(0).context("wrong argument count")?;
1529+ let _ = cx
1530+ .editor
1528− let _ = cx.editor.open(path.into(), Action::Replace)?;
1531+ .open(expand_tilde(Path::new(path)), Action::Replace)?;
1529 Ok(())
1532 Ok(())
1530 }
1533 }
1531
1534