mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-24 00:01:03 +00:00
feat: allow creating a tab with the startup directory when the tab_create command is called without specifying a path parameter (#917)
This commit is contained in:
parent
280529c2cd
commit
4b04cb24b4
1 changed files with 5 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use yazi_boot::BOOT;
|
||||
use yazi_proxy::AppProxy;
|
||||
use yazi_shared::{event::Cmd, fs::Url, render};
|
||||
|
||||
|
|
@ -15,7 +16,10 @@ impl From<Cmd> for Opt {
|
|||
if c.named.contains_key("current") {
|
||||
Self { url: Default::default(), current: true }
|
||||
} else {
|
||||
Self { url: c.take_first().map_or_else(|| Url::from("."), Url::from), current: false }
|
||||
Self {
|
||||
url: c.take_first().map_or_else(|| Url::from(&BOOT.cwd), Url::from),
|
||||
current: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue