Summary: This article documents 5 typical pitfalls encountered when configuring Nushell 0.113.1 with AtomCode on macOS, including wrong config directory paths, verification mistakes, PATH inheritance issues, config key confusion, and default value overrides — along with the final working configuration.
1. Background
Date: 2026-07-07
Environment: macOS, Nushell 0.113.1 (Homebrew), nu at /opt/homebrew/bin/nu
Goals: ① Use atomcode command within nushell; ② No welcome message on startup; ③ No timestamp on the right side of the prompt
2. Pitfall 1: Nushell’s Config Directory Isn’t ~/.config/nushell/
2.1 Symptom
Adding $env.PROMPT_COMMAND_RIGHT = {|| "" } in ~/.config/nushell/env.nu has no effect — the timestamp still shows.
2.2 Root Cause
On macOS, nushell 0.113 loads its config from:
~/Library/Application Support/nushell/
Not ~/.config/nushell/ (which is the Linux path). Check the actual directory:
nu
$nu.default-config-dir
# => /Users/<user>/Library/Application Support/nushell
The two files in ~/.config/nushell/ are never loaded — all changes there are wasted.
2.3 Fix
Put all changes in ~/Library/Application Support/nushell/ under env.nu / config.nu.
3. Pitfall 2: nu -c Doesn’t Load config.nu, Misleading Verification
3.1 Symptom
Set $env.config.show_banner = false in config.nu, then run nu -c '$env.config.show_banner' — returns true, making it seem like the config didn’t take effect.
3.2 Root Cause
nu -c '...' (non-interactive script mode) does not load config.nu at all. It only uses built-in defaults. So checking $env.config.show_banner with nu -c always returns the default true.
3.3 Correct Verification
Use nu -e '...': it executes the command then enters interactive mode, which does load config.nu.
nu -e 'print $"banner=($env.config.show_banner)"'
# => banner=false
Or use expect to simulate a TTY and spawn a real interactive session.
4. Pitfall 3: New Terminal Tab Reports atomcode not found
4.1 Symptom
In an existing terminal, nushell finds atomcode (which atomcode resolves to ~/.local/bin/atomcode). But opening a new terminal tab and starting nushell gives:
Error: nu::shell::external_command
× External command failed
· Command `atomcode` not found
4.2 Root Cause
atomcode lives in ~/.local/bin/, which is added to PATH via export PATH="~/.local/bin:$PATH" in ~/.zshrc. However, macOS Terminal/iTerm may not re-source ~/.zshrc when opening new tabs — especially when the shell is set to “non-login” mode, or only reads ~/.zprofile (which is often empty). The new tab gets a minimal PATH inherited from the GUI process, without ~/.local/bin.
Evidence: launchctl getenv PATH returns empty, meaning the GUI layer never set PATH, and the new tab’s PATH depends entirely on zsh startup files, which may not include ~/.zshrc.
4.3 Fix
Don’t rely on whether the outer shell sourced ~/.zshrc. Add PATH directly in nushell’s env.nu (loaded unconditionally on every startup, before config.nu):
# ~/Library/Application Support/nushell/env.nu
use std/util "path add"
path add "~/.local/bin"
Verification (with a stripped PATH to simulate the worst case):
PATH=/opt/homebrew/bin:/usr/bin:/bin nu -e 'which atomcode | get command | print'
# => atomcode ← still visible
5. Pitfall 4: Config Key Is show_banner, Not banner
5.1 Symptom
Running nu -c '$env.config.banner' reports:
Error: nu::shell::name_not_found
· `-- did you mean 'show_banner'?
5.2 Root Cause
The config option to disable the welcome message is show_banner (bool|string):
$env.config.show_banner = false # hide
$env.config.show_banner = true # show full banner (default)
$env.config.show_banner = "short" # show startup time only
Check the docs:
config nu --doc | nu-highlight | less -R
6. Pitfall 5: GitHub Issue #8698 — show_banner Overridden by Default at EOF
6.1 Symptom
Setting $env.config.show_banner = false at the top of config.nu — the banner still appears.
6.2 Root Cause
The default config.nu generated by nushell installation ends with $env.config.show_banner = true. The false set at the top gets overwritten by the true at the bottom.
6.3 Fix
Place your settings at the end of the file, or delete the default true line. Use config nu to open the editor.
7. Final Working Configuration
7.1 ~/Library/Application Support/nushell/env.nu
# Loaded unconditionally on startup, before config.nu
# Don't rely on whether the outer shell sourced ~/.zshrc
use std/util "path add"
path add "~/.local/bin"
7.2 ~/Library/Application Support/nushell/config.nu (append after the comment section)
# Disable startup welcome message
$env.config.show_banner = false
# Clear right prompt, removing the timestamp
$env.PROMPT_COMMAND_RIGHT = {|| "" }
8. Summary
- Put config in the right directory: macOS uses
~/Library/Application Support/nushell/, not~/.config/nushell/ - Verify with
nu -e, notnu -c(the latter doesn’t loadconfig.nu) - PATH belongs in
env.nu(loaded unconditionally), don’t rely on the outer shell’s~/.zshrc - The config key for disabling banner is
$env.config.show_banner, and watch out for the default value at the end of the file