From c49bf02ca47fd0d53e69621743c6c2cc5d67cf93 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 12 Nov 2023 06:54:18 +0800 Subject: [PATCH] fix: `cd` doesn't expand the path automatically --- yazi-core/src/tab/commands/cd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-core/src/tab/commands/cd.rs b/yazi-core/src/tab/commands/cd.rs index c3b4a322..74935103 100644 --- a/yazi-core/src/tab/commands/cd.rs +++ b/yazi-core/src/tab/commands/cd.rs @@ -15,7 +15,7 @@ pub struct Opt { impl From<&Exec> for Opt { fn from(e: &Exec) -> Self { Self { - target: e.args.first().map(Url::from).unwrap_or_default(), + target: Url::from(expand_path(e.args.first().map(|s| s.as_str()).unwrap_or(""))), interactive: e.named.contains_key("interactive"), } }