From d18e8d4489fde942e18babc870daa02ed18ea482 Mon Sep 17 00:00:00 2001 From: shimeoki Date: Sun, 29 Jun 2025 19:24:48 +0300 Subject: [PATCH 1/3] fix: add group name to pause previously it was impossible to specify --- modules/background_task/task.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/background_task/task.nu b/modules/background_task/task.nu index ba65d1386..342e88448 100644 --- a/modules/background_task/task.nu +++ b/modules/background_task/task.nu @@ -180,14 +180,14 @@ export def restart [ # A paused group won't start any new tasks automatically. export def pause [ ...ids: int # IDs of the tasks to pause. - --group (-g) # Pause a specific group + --group (-g): string # Pause a specific group --all (-a) # Pause all groups. --wait (-w) # Only pause the specified group and let already running tasks finish by themselves ] { mut args = [] if $group != null { - $args = ($args | prepend "--group") + $args = ($args | prepend ["--group" $group]) } if $all != null { $args = ($args | prepend "--all") From 806aca1e2579c96ff88a5acd00651c4c905ecbdc Mon Sep 17 00:00:00 2001 From: shimeoki Date: Sun, 29 Jun 2025 19:26:06 +0300 Subject: [PATCH 2/3] fix: address parameters as booleans because with no type there are booleans with false by default and cannot be null --- modules/background_task/task.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/background_task/task.nu b/modules/background_task/task.nu index 342e88448..c97248c89 100644 --- a/modules/background_task/task.nu +++ b/modules/background_task/task.nu @@ -189,10 +189,10 @@ export def pause [ if $group != null { $args = ($args | prepend ["--group" $group]) } - if $all != null { + if $all { $args = ($args | prepend "--all") } - if $wait != null { + if $wait { $args = ($args | prepend "--wait") } From a6ca2ddbc360c51984dbb70da5f92194db4521a3 Mon Sep 17 00:00:00 2001 From: shimeoki Date: Sun, 29 Jun 2025 19:27:55 +0300 Subject: [PATCH 3/3] style: align parameter descriptions to comply with the previous code --- modules/background_task/task.nu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/background_task/task.nu b/modules/background_task/task.nu index c97248c89..41f76b1bd 100644 --- a/modules/background_task/task.nu +++ b/modules/background_task/task.nu @@ -179,10 +179,10 @@ export def restart [ # # A paused group won't start any new tasks automatically. export def pause [ - ...ids: int # IDs of the tasks to pause. + ...ids: int # IDs of the tasks to pause. --group (-g): string # Pause a specific group - --all (-a) # Pause all groups. - --wait (-w) # Only pause the specified group and let already running tasks finish by themselves + --all (-a) # Pause all groups. + --wait (-w) # Only pause the specified group and let already running tasks finish by themselves ] { mut args = []