{"id":"80fb66c1-e37f-46c8-b2da-7aef8a5052c8","task":"Manage shell environment and PATH across login and interactive shells using zsh profile files","domain":"zsh.sourceforge.io","steps":["Understand load order on macOS/zsh: .zshenv (all shells) → .zprofile (login shells) → .zshrc (interactive shells); place environment variables like PATH and EDITOR in .zshenv or .zprofile, not .zshrc.","Export PATH additions in ~/.zprofile: export PATH=\"/usr/local/bin:$PATH\" so they are inherited by GUI apps and non-interactive login shells.","Place aliases, functions, prompt configuration, and completion setup in ~/.zshrc — these only apply to interactive sessions.","Use .zshenv for variables that must reach non-interactive scripts (e.g., cron or launchd jobs): export LANG=en_US.UTF-8","Reload the current shell's rc without logging out: source ~/.zshrc (reloads aliases/functions but does not re-run .zprofile)."],"gotchas":["On macOS, /etc/zprofile runs path_helper to set PATH before ~/.zprofile; prepend entries rather than overwriting PATH entirely to avoid losing system paths.",".zshenv is sourced for every shell invocation including scripts called by launchd or cron; keep it minimal and avoid interactive commands or slow initialisation in it.","Changes to .zprofile take effect only in new login shells; open a new Terminal window or run exec -l zsh to apply them without logging out."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/80fb66c1-e37f-46c8-b2da-7aef8a5052c8"}