]> arthur.barton.de Git - ax-zsh.git/blob - default_plugins/byebye/byebye.zlogout
242b0db06b85d73d88017eb66a307ec96d8da00c
[ax-zsh.git] / default_plugins / byebye / byebye.zlogout
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # byebye.zlogout -- Say goodbye to interactive users
3
4 [[ -o interactive ]] || return
5 [[ -n "$AXZSH_PLUGIN_CHECK" ]] || return 92
6
7 # Clear the console if it is a local terminal
8 case `tty` in
9     /dev/tty[0-9]*|/dev/ttyS[0-9]*)
10         [[ -x /usr/bin/clear_console ]] \
11                 && /usr/bin/clear_console --quiet \
12                 || clear
13         ;;
14     *)
15         echo "Bye, bye, $LOGNAME!"
16         echo
17 esac