$LOGNAME
 – 
Current login name
$LOGNAME contains the login name of the current login session.
If $LOGNAME is not set in the environment of the shell, it’s initialized to the string returned by the getlogin(3) system call if available.
Links
BashSupport Pro ist eine Zsh IDE mit Unterstützung für $LOGNAME - probieren Sie es jetzt aus!