Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init/nushell.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def --env lmod-eval [script: string] {
# Handle different value types
if ($var_value | str starts-with 'r#') and ($var_value | str ends-with '#') {
# Raw string value - extract the content
let content = ($var_value | str substring 3..(-2))
let content = ($var_value | str substring 3..(-3))
load-env {$var_name: $content}
} else if ($var_value | str starts-with '[') and ($var_value | str ends-with ']') {
# Array/list value - convert raw strings to regular strings then parse
Expand Down
2 changes: 1 addition & 1 deletion shells/Nushell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function Nushell.expandVar(self, k, v, vType)

-- Handle path-like variables by converting to nushell list format
-- BUT: __LMOD_REF_COUNT_* variables are encoded strings, not actual paths
if (vType == "path" and not k:match("^__LMOD_REF_COUNT_")) then
if (vType == "path" and not k:match("^__LMOD_REF_COUNT_")) and k ~= "MODULEPATH" then
lineA[#lineA + 1] = "$env."
lineA[#lineA + 1] = k
lineA[#lineA + 1] = " = ["
Expand Down
3 changes: 3 additions & 0 deletions src/tcl2lua.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,9 @@ switch -regexp -- $g_shellName {
^(fish)$ {
set g_shellType fish
}
^(nushell)$ {
set g_shellType nushell
}
^(cmake)$ {
set g_shellType cmake
}
Expand Down