Problem
The sourceable argsh wrapper (v0.10.0 release artifact) defines import() as a bash function near the end of the file unconditionally, after the earlier builtin-detection block already did unset -f import when argsh.so loaded successfully. Result: even with ARGSH_BUILTIN=1 and a matching argsh.so, type -t import reports function, and the native Rust import builtin is never used.
Repro
export PATH_BIN=/path/to/bin # contains argsh (v0.10.0) + matching argsh.so
source "${PATH_BIN}/argsh"
echo "$ARGSH_BUILTIN" # 1 — builtin loaded fine
type -t import # function — bash fallback shadows it
unset -f import
type -t import # builtin — works when unshadowed
Why it matters
The bash fallback's ^-prefix resolution and sourcing semantics differ subtly from the native builtin (resolution anchors on ARGSH_SOURCE/BASH_SOURCE[-1], walk-up behavior). Consumers like lok8s hit hard-to-debug differences depending on which implementation happens to win.
Expected
When the native builtin loads, the wrapper should not re-define import as a function (or should define it only inside the (( ! ARGSH_BUILTIN )) branch).
Found while debugging lok8s CLI breakage on 2026-06-11 (argsh 0.10.0, linux-amd64).
Problem
The sourceable
argshwrapper (v0.10.0 release artifact) definesimport()as a bash function near the end of the file unconditionally, after the earlier builtin-detection block already didunset -f importwhenargsh.soloaded successfully. Result: even withARGSH_BUILTIN=1and a matchingargsh.so,type -t importreportsfunction, and the native Rustimportbuiltin is never used.Repro
Why it matters
The bash fallback's
^-prefix resolution and sourcing semantics differ subtly from the native builtin (resolution anchors onARGSH_SOURCE/BASH_SOURCE[-1], walk-up behavior). Consumers like lok8s hit hard-to-debug differences depending on which implementation happens to win.Expected
When the native builtin loads, the wrapper should not re-define
importas a function (or should define it only inside the(( ! ARGSH_BUILTIN ))branch).Found while debugging lok8s CLI breakage on 2026-06-11 (argsh 0.10.0, linux-amd64).