diff --git a/apps/expert/lib/expert/port.ex b/apps/expert/lib/expert/port.ex index e98f6deb..8a89e96e 100644 --- a/apps/expert/lib/expert/port.ex +++ b/apps/expert/lib/expert/port.ex @@ -106,6 +106,14 @@ defmodule Expert.Port do ["-l", "-c", cmd] + "nu" -> + # Nushell stores PATH as a list in $env.PATH, so we join with colons. + # Nushell doesn't support && operator, use ; instead. + cmd = + "cd #{directory}; print $\"#{@path_marker}:($env.PATH | str join \":\"):#{@path_marker}\"" + + ["-l", "-c", cmd] + _ -> cmd = "cd #{directory} && printf \"#{@path_marker}:%s:#{@path_marker}\" \"$PATH\"" ["-i", "-l", "-c", cmd]