diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-30 14:08:46 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-30 14:08:46 +1300 |
commit | 02240d70a8c0c22f423c3b314f19ba72f45ee816 (patch) | |
tree | 1b826061d2ab0b07782155774e001ffffdfc6e86 | |
parent | Use ||/&& short-circuiting only for flow control (diff) | |
download | dotfiles-02240d70a8c0c22f423c3b314f19ba72f45ee816.tar.gz dotfiles-02240d70a8c0c22f423c3b314f19ba72f45ee816.zip |
Add explanatory comments for version check
-rw-r--r-- | bash/bashrc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc index e8348317..b8ecec01 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -21,9 +21,9 @@ if [ -n "$ENV" ] ; then . "$ENV" fi -# Ensure we're using at least version 3.0. -[ -n "$BASH_VERSINFO" ] || return -((BASH_VERSINFO[0] >= 3)) || return +# Ensure we're using at least version 3.0 +[ -n "$BASH_VERSINFO" ] || return # Check version array exists (>=2.0) +((BASH_VERSINFO[0] >= 3)) || return # Check actual major version number # Clear away command_not_found_handle if a system bashrc file set it up unset -f command_not_found_handle |