Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 992b06920c0a1e73029e8aae093e67ac255ed0ab 1 parent 864f237
@tejr authored
Showing with 20 additions and 20 deletions.
  1. +1 −20 bash/bash_profile
  2. +19 −0 bash/bashrc
View
21 bash/bash_profile
@@ -1,22 +1,3 @@
-# Source .bashrc if it exists.
+# Just source .bashrc if it exists.
[[ -e "${HOME}/.bashrc" ]] && source "${HOME}/.bashrc"
-# Add various paths if they exist.
-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
-
-# None of this UTF8 drawing characters nonsense.
-export NCURSES_NO_UTF8_ACS=1
-
View
19 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;;
Please sign in to comment.
Something went wrong with that request. Please try again.