Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Tom Ryder authored

Showing 2 changed files with 20 additions and 20 deletions. Show diff stats Hide diff stats

  1. +1 20 bash/bash_profile
  2. +19 0 bash/bashrc
21 bash/bash_profile
... ... @@ -1,22 +1,3 @@
1   -# Source .bashrc if it exists.
  1 +# Just source .bashrc if it exists.
2 2 [[ -e "${HOME}/.bashrc" ]] && source "${HOME}/.bashrc"
3 3
4   -# Add various paths if they exist.
5   -DIRS="${HOME}/bin
6   - /usr/local/apache/bin
7   - /usr/local/mysql/bin
8   - /usr/local/nagios/bin
9   - /usr/local/pgsql/bin"
10   -for DIR in $DIRS; do
11   - if [[ -d "$DIR" ]] && [[ ":${PATH}:" != *":${DIR}:"* ]]; then
12   - if [[ -n "$PATH" ]]; then
13   - PATH="${DIR}:${PATH}"
14   - else
15   - PATH=$DIR
16   - fi
17   - fi
18   -done
19   -
20   -# None of this UTF8 drawing characters nonsense.
21   -export NCURSES_NO_UTF8_ACS=1
22   -
19 bash/bashrc
@@ -4,6 +4,9 @@
4 4 # Use vi as my text editor.
5 5 export EDITOR=vi
6 6
  7 +# None of this UTF8 drawing characters nonsense.
  8 +export NCURSES_NO_UTF8_ACS=1
  9 +
7 10 # Keep plenty of history.
8 11 unset HISTFILESIZE
9 12 HISTSIZE=1000000
@@ -53,6 +56,22 @@ hash stty &>/dev/null && stty -ixon
53 56 # SSH agent setup, if available.
54 57 [[ -e "${HOME}/.ssh/agent" ]] && source "${HOME}/.ssh/agent"
55 58
  59 +# Add various paths if they exist and aren't already in here.
  60 +DIRS="${HOME}/bin
  61 + /usr/local/apache/bin
  62 + /usr/local/mysql/bin
  63 + /usr/local/nagios/bin
  64 + /usr/local/pgsql/bin"
  65 +for DIR in $DIRS; do
  66 + if [[ -d "$DIR" ]] && [[ ":${PATH}:" != *":${DIR}:"* ]]; then
  67 + if [[ -n "$PATH" ]]; then
  68 + PATH="${DIR}:${PATH}"
  69 + else
  70 + PATH=$DIR
  71 + fi
  72 + fi
  73 +done
  74 +
56 75 # If we're using an xterm, force 256 colors.
57 76 case "$TERM" in
58 77 xterm*) TERM=xterm-256color;;

0 comments on commit 992b069

Please sign in to comment.
Something went wrong with that request. Please try again.