From 598bb470dbae6d3270fc5e4d7375fe2d5f3e7354 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 23 Aug 2026 20:06:33 +0800 Subject: [PATCH] fix(nushell): import argx & lg with prefix to avoid shadowing builtins `use modules/argx *` glob-imports argx's `parse` command into the global scope, shadowing nushell's builtin `parse`. Any script sourced afterwards that relies on the builtin (e.g. fzf's nushell integration, which uses `parse --regex`) then fails to parse with `unknown flag`. Use prefixed imports for `argx` and `lg` instead of `*`: both modules are still registered for the kubernetes module's submodules (which call `argx parse` / `lg level`), there are no bare `parse`/`main`/`level` call sites, and the builtin `parse` stays available. --- home/base/tui/shell/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/home/base/tui/shell/default.nix b/home/base/tui/shell/default.nix index 962a5e59..ab0d5757 100644 --- a/home/base/tui/shell/default.nix +++ b/home/base/tui/shell/default.nix @@ -46,8 +46,11 @@ # -*- modules -*- # argx & lg is required by the kubernetes module - use modules/argx * - use modules/lg * + # NOTE: use a prefixed import (not `*`), otherwise argx's `parse` command + # would shadow nushell's builtin `parse`, breaking scripts that rely on + # the builtin (e.g. fzf's nushell integration uses `parse --regex`) + use modules/argx + use modules/lg # k8s/helm aliases, completions, use modules/kubernetes * # a wrapper around the jc cli tool, convert cli outputs to nushell tables