aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-06-19 16:08:08 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-06-19 16:08:08 +1200
commit5408d7d473f63fc2c8110f44a3784579163efa6e (patch)
treebcbf794841670beaa4941da67dbdb9e92d0e593b /bash/bashrc
parentAdd ZA mapping to force write all (diff)
downloaddotfiles-5408d7d473f63fc2c8110f44a3784579163efa6e.tar.gz
dotfiles-5408d7d473f63fc2c8110f44a3784579163efa6e.zip
Put everything including paths stuff in .bashrc.
Heresy, I know, but I'm sick of dealing with the distinction between login shells and non-login shells, particularly as far as my $PATH is concerned.
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc19
1 files changed, 19 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 8b4686e1..2cd1f905 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -4,6 +4,9 @@
# Use vi as my text editor.
export EDITOR=vi
+# None of this UTF8 drawing characters nonsense.
+export NCURSES_NO_UTF8_ACS=1
+
# Keep plenty of history.
unset HISTFILESIZE
HISTSIZE=1000000
@@ -53,6 +56,22 @@ hash stty &>/dev/null && stty -ixon
# SSH agent setup, if available.
[[ -e "${HOME}/.ssh/agent" ]] && source "${HOME}/.ssh/agent"
+# Add various paths if they exist and aren't already in here.
+DIRS="${HOME}/bin
+ /usr/local/apache/bin
+ /usr/local/mysql/bin
+ /usr/local/nagios/bin
+ /usr/local/pgsql/bin"
+for DIR in $DIRS; do
+ if [[ -d "$DIR" ]] && [[ ":${PATH}:" != *":${DIR}:"* ]]; then
+ if [[ -n "$PATH" ]]; then
+ PATH="${DIR}:${PATH}"
+ else
+ PATH=$DIR
+ fi
+ fi
+done
+
# If we're using an xterm, force 256 colors.
case "$TERM" in
xterm*) TERM=xterm-256color;;