aboutsummaryrefslogblamecommitdiff
path: root/bash/bash_logout
blob: 6f539b0479ce6a599094af36f3a793341568a246 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                               
                                 


          
                                            
                        
                                
  
 


                                                      
# Give up completely if no BASH_VERSINFO (<2.0)
if ! test "$BASH_VERSINFO" ; then
    return
fi

# Clear console if possible when logging out
if ((SHLVL == 1)) ; then
    clear_console -q 2>/dev/null
fi

# Write PWD to a file if set
printf '%s\n' "$PWD" > "${OLDPWD_FILE:-$HOME/.oldpwd}"