From 249e1eae5897f348ded86e75d48f5c1810b88b04 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 5 Dec 2023 17:54:53 +0300 Subject: [PATCH] Use --wrapped for nu --- machines/enka/nushell/environment.nu | 2 +- rebuild.nu | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/enka/nushell/environment.nu b/machines/enka/nushell/environment.nu index 2127877..05062d4 100644 --- a/machines/enka/nushell/environment.nu +++ b/machines/enka/nushell/environment.nu @@ -12,7 +12,7 @@ $env.ENV_CONVERSIONS.PATH = { } } -def hx [...arguments] { +def --wrapped hx [...arguments] { kitty @ set-spacing padding=0 ^hx $arguments diff --git a/rebuild.nu b/rebuild.nu index 7db1c55..cdeb4c2 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -4,9 +4,9 @@ def complete [] { ls machines } -def main [ +def main --wrapped [ machine: string@complete = "" # The machine to build. - --no-trace # Wheter to not show the full trace. + ...arguments ] { mut machine_ = $machine @@ -29,5 +29,5 @@ def main [ } sudo --validate - sh -c $"sudo nixos-rebuild switch (if not $no_trace { --show-trace } else {}) --log-format internal-json --impure --flake ('.#' + $machine) |& nom --json" + sh -c $"sudo nixos-rebuild switch ($arguments | str join ' ') --log-format internal-json --impure --flake ('.#' + $machine) |& nom --json" }