fix: cd doesn't expand the path automatically

This commit is contained in:
sxyazi 2023-11-12 06:54:18 +08:00
parent 1a0753367e
commit c49bf02ca4
No known key found for this signature in database

View file

@ -15,7 +15,7 @@ pub struct Opt {
impl From<&Exec> for Opt { impl From<&Exec> for Opt {
fn from(e: &Exec) -> Self { fn from(e: &Exec) -> Self {
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"), interactive: e.named.contains_key("interactive"),
} }
} }