diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 21:09:15 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 21:25:15 +1200 |
commit | 7ddb8084297c5bf30db73e9b9058d71f52991901 (patch) | |
tree | 8b07077307ae6209d9e094270dbcc65b5e7e80c7 /bash/bash_logout | |
parent | Restructure ed() to test,cache features on login (diff) | |
download | dotfiles-7ddb8084297c5bf30db73e9b9058d71f52991901.tar.gz dotfiles-7ddb8084297c5bf30db73e9b9058d71f52991901.zip |
Many stylistic fixes/optimisations
In particular, limit the verbose >=2.05 test to just one file: .bashrc
Diffstat (limited to 'bash/bash_logout')
-rw-r--r-- | bash/bash_logout | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/bash/bash_logout b/bash/bash_logout index afb088b8..911b4f66 100644 --- a/bash/bash_logout +++ b/bash/bash_logout @@ -1,14 +1,2 @@ -# Ensure we're using at least version 2.05. Weird arithmetic syntax needed here -# due to leading zeroes and trailing letters in some 2.x version numbers (e.g. -# 2.05a). -if ! [ -n "$BASH_VERSINFO" ] ; then - return -elif ((BASH_VERSINFO[0] == 2)) && - ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) ; then - return -fi - # Clear console if possible when logging out -if ((SHLVL == 1)) ; then - clear_console -q 2>/dev/null -fi +[ "$SHLVL" = 1 ] && clear_console -q 2>/dev/null |