aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-22 12:47:37 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-22 12:47:37 +1200
commit449c1b246f133eb58045a4ebaa8c1f11d79f347b (patch)
tree0958e14b41a5d6014b163d314b7a1cda4d5d4d5a /bash
parentFormat $BROWSER mention (diff)
downloaddotfiles-449c1b246f133eb58045a4ebaa8c1f11d79f347b.tar.gz
dotfiles-449c1b246f133eb58045a4ebaa8c1f11d79f347b.zip
Move .bashrc interactivity test to top
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc12
1 files changed, 6 insertions, 6 deletions
diff --git a/bash/bashrc b/bash/bashrc
index d6b2adca..d2562749 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -1,3 +1,9 @@
+# Make sure the shell is interactive
+case $- in
+ *i*) ;;
+ *) return ;;
+esac
+
# 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).
@@ -6,12 +12,6 @@
((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) &&
return
-# Make sure the shell is interactive
-case $- in
- *i*) ;;
- *) return ;;
-esac
-
# Don't do anything if running a restricted shell
shopt -q restricted_shell && return