diff --git a/internal/boxcli/global.go b/internal/boxcli/global.go index d1fb27f3ddd..7601ea03209 100644 --- a/internal/boxcli/global.go +++ b/internal/boxcli/global.go @@ -115,9 +115,19 @@ func ensureGlobalEnvEnabled(cmd *cobra.Command, args []string) error { Add the following line to your shell's rcfile and restart your shell: For bash/zsh (~/.bashrc or ~/.zshrc): - eval "$(devbox global shellenv)" - -For nushell: See NUSHELL.md for setup instructions + eval "$(devbox global shellenv --init-hook)" + +For fish (~/.config/fish/config.fish): + devbox global shellenv --init-hook | source + +For nushell (~/.config/nushell/env.nu): + devbox global shellenv --format nushell --preserve-path-stack -r + | lines + | parse "$env.{name} = \"{value}\"" + | where name != null + | transpose -r + | into record + | load-env `, ) }