summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-05 12:59:36 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-05 12:59:36 (EST)
commitc6f56dabda82e91b8b65aca4d1a5aef6fcefd28b (patch)
tree66223febdf236ba1c0cedd2ee67d6808c2ce7f7f
parent3d66449c1841c6ac37bb54b8aa3cf9b9482ff07a (diff)
downloadbash-c6f56dabda82e91b8b65aca4d1a5aef6fcefd28b.zip
bash-c6f56dabda82e91b8b65aca4d1a5aef6fcefd28b.tar.gz
bash-c6f56dabda82e91b8b65aca4d1a5aef6fcefd28b.tar.bz2
Better organize things
-rw-r--r--.bash_aliases6
-rw-r--r--.bash_exports15
-rw-r--r--.bashrc30
-rwxr-xr-x.gitignore.d/bash1
4 files changed, 31 insertions, 21 deletions
diff --git a/.bash_aliases b/.bash_aliases
index 6fd4a13..49c64a2 100644
--- a/.bash_aliases
+++ b/.bash_aliases
@@ -2,6 +2,7 @@
alias ls='LC_COLLATE=C ls --color=auto'
alias lsc='LC_COLLATE=C ls --color=always'
+alias grep='grep --color=auto'
alias sort='LC_COLLATE=C sort'
alias less='less -R'
alias irc='ssh -t odin1.pehjota.net screen -dR irc weechat-curses'
@@ -10,8 +11,3 @@ b()
{
"${@}" >/dev/null 2>&1 &
}
-
-# Add the "interactive bin" directory.
-if [ -d "${HOME}/ibin" ] ; then
- PATH="${HOME}/ibin:${PATH}"
-fi
diff --git a/.bash_exports b/.bash_exports
new file mode 100644
index 0000000..58b9ab6
--- /dev/null
+++ b/.bash_exports
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+export LC_ALL='en_US.UTF-8'
+export LC_TIME='en_DK.UTF-8'
+export EDITOR='vim'
+
+if [ -x /usr/bin/dircolors ]; then
+ if [ -r ~/.dircolors ]; then
+ eval "$(dircolors -b ~/.dircolors)"
+ else
+ eval "$(dircolors -b)"
+ fi
+fi
+
+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
diff --git a/.bashrc b/.bashrc
index 8c086b4..0384e59 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,38 +1,36 @@
+PATH='/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
+PATH="${HOME}/bin:${PATH}"
+
+# Interactive only beyond this point
[ -z "${PS1}" ] && return
+PATH="${HOME}/ibin:${PATH}"
+
+# Bash history
HISTSIZE=1000
HISTFILESIZE=1000
HISTCONTROL=ignoreboth
shopt -s histappend
-[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-
+# Prompt
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
-
-# Set terminal window title.
+# Terminal window title
case "${TERM}" in xterm*|rxvt*)
PS1="\[\e]0;\u@\h:\w\a\]${PS1}"
;;
esac
-export LC_ALL='en_US.UTF-8'
-export LC_TIME='en_DK.UTF-8'
-export EDITOR='vim'
-
-if [ -x /usr/bin/dircolors ]; then
- if [ -r ~/.dircolors ]; then
- eval "$(dircolors -b ~/.dircolors)"
- else
- eval "$(dircolors -b)"
- fi
- alias ls='ls --color=auto'
- alias grep='grep --color=auto'
+# Environment
+if [ -f ~/.bash_exports ]; then
+ . ~/.bash_exports
fi
+# Aliases and functions
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
+# Completions
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
diff --git a/.gitignore.d/bash b/.gitignore.d/bash
index 14d0be9..9a23ae6 100755
--- a/.gitignore.d/bash
+++ b/.gitignore.d/bash
@@ -3,6 +3,7 @@
# Include relevant files
!/.bashrc
+!/.bash_exports
!/.bash_aliases
!/ibin/
!/ibin/*