on master help sign in
Expand `~` in `change-current-directory` command (#692)
commit7e1123680f474bff5113db189f63ca7f948781a5 authorWojciech Kępka <wojciech@wkepka.dev> dateThu 2 Sep 2021, 04:03 (5 years ago) parent5766f5d
1 file changed+5−1
helix-term/src/commands.rs+5−1
helix-term/src/commands.rs+5−1
@@ -1838,7 +1838,11 @@ mod cmd {
18381838 args: &[&str],
18391839 _event: PromptEvent,
18401840 ) -> anyhow::Result<()> {
1841− let dir = args.first().context("target directory not provided")?;
1841+ let dir = helix_core::path::expand_tilde(
1842+ args.first()
1843+ .context("target directory not provided")?
1844+ .as_ref(),
1845+ );
18421846
18431847 if let Err(e) = std::env::set_current_dir(dir) {
18441848 bail!("Couldn't change the current working directory: {}", e);