Add tilde expansion for file opening (#782)
* change to helix_core's tilde expansion, from helix-core::path::expand_tilde
This commit is contained in:
parent
2e0803c8d9
commit
df55eaae69
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue