diff options
author | Blaž Hrastnik | 2021-11-19 03:06:19 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-19 03:09:17 +0000 |
commit | 2b7c0866538676de4e5738d82e450163ff733104 (patch) | |
tree | 80118d360980738c190b259cc3725c98b5f2413f /helix-term/src | |
parent | f2b4ff23badc48e8a606eae07ef62fa56ebbf6f6 (diff) |
fix: Expand tilde first, then deal with relative paths
Otherwise the ~ gets treated as a relative path.
Fixes #1107
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index e5cf7bb2..431265cd 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1767,11 +1767,8 @@ 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(expand_tilde(Path::new(path)), Action::Replace)?; + let _ = cx.editor.open(path.into(), Action::Replace)?; Ok(()) } |