mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-09-21 04:57:25 +03:00
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
@ -1524,8 +1524,11 @@ fn open(
|
||||
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 New Issue
Block a user