Add tilde expansion for file opening (#782)

* change to helix_core's tilde expansion,
    from helix-core::path::expand_tilde
pull/788/head
Matt W 3 years ago committed by GitHub
parent 2e0803c8d9
commit df55eaae69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(())
}

Loading…
Cancel
Save