mirror of https://github.com/helix-editor/helix
Add tilde expansion for file opening (#782)
* change to helix_core's tilde expansion, from helix-core::path::expand_tildepull/788/head
parent
2e0803c8d9
commit
df55eaae69
|
@ -1524,8 +1524,11 @@ mod cmd {
|
||||||
args: &[&str],
|
args: &[&str],
|
||||||
_event: PromptEvent,
|
_event: PromptEvent,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
|
use helix_core::path::expand_tilde;
|
||||||
let path = args.get(0).context("wrong argument count")?;
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue