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.
This commit is contained in:
Ryan Yin
2026-08-23 20:06:33 +08:00
parent 5498988ef9
commit 598bb470db
+5 -2
View File
@@ -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