[Home] Zsh logo

dot.zlogin

Zsh Wizard

Download dot.zlogin Return to Examples
  1. #
  2. # .zlogin: for login shells (zsh -l)
  3. # Written by Deborah Pickett <debbiep@csse.monash.edu.au>
  4. # with large wads written by others.
  5. #
  6. # Here are various things that only apply to login shells.
  7. # Since this is only run once per session, it supplies the
  8. # usual login messages, such as trash directory usage and
  9. # mail that may have arrived.
  10. # re-alias lo to mean logout, not exit.
  11. # just stops zsh printing logout when I type lo in a login shell
  12. alias lo=logout
  13. # make a new .signature file
  14. makesig >! ~/.signature
  15. # register on goofey if I am using it
  16. if [[ ${+USE_GOOFEY} -eq 1 ]]
  17. then
  18. goofey -Fn
  19. fortcheck
  20. fi
  21. ## turn on biff if it is present to alert me of new mail.
  22. #if [[ -x /usr/ucb/biff ]]
  23. #then
  24. # biff y
  25. #fi
  26. # tell me what mail I have
  27. #frm -q -S
  28. checkmail
  29. # remove files I never want to see
  30. if [[ ! -s "$HOME/.xsession-errors" ]]
  31. then
  32. # only remove if it is empty.
  33. /bin/rm -f "$HOME/.xsession-errors"
  34. fi
  35. # Tell me how much stuff is in the .trash directory . . .
  36. trash-purge -u
  37. # . . . and list it (won't list anything if it's empty)
  38. trash-purge -l
  39. # Check to see if this is a console login from xdm
  40. if [[ ${+ISACONSOLE} -eq 1 ]]
  41. then
  42. # put the word "console" in the xterm title
  43. XTTITLECONS=' console'
  44. # unexport ISACONSOLE. Don't unset it, just stop subshells from
  45. # getting it.
  46. typeset +x ISACONSOLE
  47. fi
  48. # Perform a null command to set exit status to zero at first prompt
  49. :