From 1b448694ea30f041f854221cc3e98646c9228612 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 11 Dec 2024 15:55:39 -0700 Subject: [PATCH] fish: sd_boot_kernel: Add support for passing along '--when=' Signed-off-by: Nathan Chancellor --- fish/functions/sd_boot_kernel.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fish/functions/sd_boot_kernel.fish b/fish/functions/sd_boot_kernel.fish index a9404987..72651228 100644 --- a/fish/functions/sd_boot_kernel.fish +++ b/fish/functions/sd_boot_kernel.fish @@ -9,6 +9,8 @@ function sd_boot_kernel -d "Boot a kernel via full reboot or kexec using systemd set reboot kexec case -r --reboot set reboot reboot + case --when='*' + set -a systemctl_args $arg case '*' set krnl linux-(string replace 'linux-' '' $arg) end @@ -62,8 +64,8 @@ function sd_boot_kernel -d "Boot a kernel via full reboot or kexec using systemd return 1 end - set -a reboot --boot-loader-entry=$conf + set -a systemctl_args --boot-loader-entry=$conf end - sudo systemctl $reboot + sudo systemctl $reboot $systemctl_args end