Skip to content

Commit

Permalink
Updated some bash config formatting for if statements and sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
cparadis6191 committed Jun 21, 2015
1 parent b31edc2 commit 635281d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
21 changes: 1 addition & 20 deletions bash_profile
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
# Source the users bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
if [[ -f "$HOME/.bashrc" ]]; then
source "$HOME/.bashrc"
fi

#if [ -f "/etc/bashrc" ]; then
# source "/etc/bashrc"
#fi

# Set PATH so it includes user's private bin if it exists
# if [ -d "$HOME/bin" ] ; then
# PATH="$HOME/bin:$PATH"
# fi

# Set MANPATH so it includes users' private man if it exists
# if [ -d "$HOME/man" ]; then
# MANPATH="$HOME/man:$MANPATH"
# fi

# Set INFOPATH so it includes users' private info if it exists
# if [ -d "$HOME/info" ]; then
# INFOPATH="$HOME/info:$INFOPATH"
# fi
10 changes: 6 additions & 4 deletions bashrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
if [[ $- != *i* ]]; then
return
fi

# -- Shell Options --
# See man bash for more options...
PS1='\[\033[32m\]\u\[\033[m\]\[\033[34m\]@\[\033[m\]\[\033[35m\]\h\[\033[m\] \[\033[33m\]\W\[\033[m\]\\$ '
PS2=' > ' # Another custom prompt if a quote is not closed

# If running in a nice gui terminal emulator set the window title
if [ ! "$TERM" == 'linux' ] && [ ! "$TERM" == 'console' ]; then
if [[ "$TERM" != 'linux' ]] && [[ "$TERM" != 'console' ]]; then
PROMPT_COMMAND='echo -ne "\033]0;$TERM $SHELL $PWD\007"'
fi

Expand Down Expand Up @@ -48,6 +50,6 @@ alias less='less -P "?f%f .?n?m(%T %i of %m) ..?ltlines %lt-%lb?L/%L. :byte %bB?
# -- Functions --

# -- Local Environment --
if [ -f $HOME/.bashrc.local ]; then
source $HOME/.bashrc.local
if [[ -f "$HOME/.bashrc.local" ]]; then
source "$HOME/.bashrc.local"
fi

0 comments on commit 635281d

Please sign in to comment.