Skip to content

Commit

Permalink
Add bash_logout file for bash profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
briancain committed Feb 1, 2015
1 parent fc0cc25 commit 3f118ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bash_logout
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
4 changes: 4 additions & 0 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ function symlink_files() {
if [[ $LOGIN_SHELL == 'bash' ]] ; then
link_file $f
fi
elif [[ $f =~ 'bash_logout' ]]; then
if [[ $LOGIN_SHELL == 'bash' ]] ; then
link_file $f
fi
elif [[ $f =~ 'zshrc' || $f =~ 'oh-my-zsh' ]]; then
if [[ $LOGIN_SHELL == 'zsh' ]] ; then
link_file $f
Expand Down

0 comments on commit 3f118ea

Please sign in to comment.