My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.zshenv 701B

1234567891011121314151617181920212223242526272829
  1. local _old_path="$PATH"
  2. # Local config
  3. [[ -f ~/.zshenv.local ]] && source ~/.zshenv.local
  4. if [[ $PATH != $_old_path ]]; then
  5. # `colors` isn't initialized yet, so define a few manually
  6. typeset -AHg fg fg_bold
  7. if [ -t 2 ]; then
  8. fg[red]=$'\e[31m'
  9. fg_bold[white]=$'\e[1;37m'
  10. reset_color=$'\e[m'
  11. else
  12. fg[red]=""
  13. fg_bold[white]=""
  14. reset_color=""
  15. fi
  16. cat <<MSG >&2
  17. ${fg[red]}Warning:${reset_color} your \`~/.zshenv.local' configuration seems to edit PATH entries.
  18. Please move that configuration to \`.zshrc.local' like so:
  19. ${fg_bold[white]}cat ~/.zshenv.local >> ~/.zshrc.local && rm ~/.zshenv.local${reset_color}
  20. (called from ${(%):-%N:%i})
  21. MSG
  22. fi
  23. unset _old_path