mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-20 07:11:33 +03:00
fix: task name when process arguments are empty
This commit is contained in:
parent
0da93562c9
commit
acb2eee65f
@ -280,12 +280,13 @@ impl Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn process_open(&self, opener: &Opener, args: &[impl AsRef<OsStr>]) {
|
pub(super) fn process_open(&self, opener: &Opener, args: &[impl AsRef<OsStr>]) {
|
||||||
|
let name = {
|
||||||
|
let s = format!("Execute `{}`", opener.exec);
|
||||||
|
let args = args.iter().map(|a| a.as_ref().to_string_lossy()).collect::<Vec<_>>().join(" ");
|
||||||
|
if args.is_empty() { s } else { format!("{} with `{}`", s, args) }
|
||||||
|
};
|
||||||
|
|
||||||
let mut running = self.running.write();
|
let mut running = self.running.write();
|
||||||
let name = format!(
|
|
||||||
"Exec `{}` with `{}`",
|
|
||||||
opener.exec,
|
|
||||||
args.iter().map(|a| a.as_ref()).collect::<Vec<_>>().join(" ".as_ref()).to_string_lossy()
|
|
||||||
);
|
|
||||||
let id = running.add(name);
|
let id = running.add(name);
|
||||||
|
|
||||||
let (cancel_tx, mut cancel_rx) = oneshot::channel();
|
let (cancel_tx, mut cancel_rx) = oneshot::channel();
|
||||||
|
Loading…
Reference in New Issue
Block a user