2013-06-08 22:32:09 +02:00
|
|
|
#
|
|
|
|
# ~/.bashrc
|
|
|
|
#
|
|
|
|
|
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
|
|
|
# Aliases
|
2013-07-15 15:27:51 +02:00
|
|
|
alias ls='ls -F --color=auto'
|
2013-06-08 22:32:09 +02:00
|
|
|
alias less='less -R' # preserves colors in `less`
|
|
|
|
|
|
|
|
# Environment
|
|
|
|
PS1='[\u@\h: \w]\$ '
|
2013-06-14 11:40:28 +02:00
|
|
|
export EDITOR=/usr/bin/vim
|
|
|
|
export PAGER=/usr/bin/less
|
2013-06-18 14:05:37 +02:00
|
|
|
# sequence to set the terminal title to "user@hostname: pwd"
|
|
|
|
TITLEBAR='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
|
2013-06-08 22:32:09 +02:00
|
|
|
# Aggressive read/write of history after every command
|
2013-06-18 14:05:37 +02:00
|
|
|
PROMPT_COMMAND="$TITLEBAR; history -a; history -n"
|
2013-08-05 14:25:50 +02:00
|
|
|
# don't add commands starting with space to the history
|
|
|
|
HISTCONTROL=ignorespace
|
2013-08-07 10:58:24 +02:00
|
|
|
# use nicer fonts in Java apps
|
|
|
|
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
|
2013-06-08 22:32:09 +02:00
|
|
|
|
|
|
|
# If a private bin directory exists, add it to PATH
|
|
|
|
[[ -d ~/bin ]] && PATH="$PATH:~/bin"
|
|
|
|
|
|
|
|
# solarized dircolors
|
|
|
|
[[ -r ~/.dircolors.ansi-dark ]] && eval `dircolors ~/.dircolors.ansi-dark`
|
|
|
|
|
|
|
|
# Settings
|
|
|
|
# Don't exit when accidentally pressing ^D
|
|
|
|
set -o ignoreeof
|
|
|
|
|
|
|
|
# Append, rather than overwrite history files
|
|
|
|
# Useful for when multiple bash sessions are running
|
|
|
|
shopt -s histappend
|
2013-06-17 16:59:51 +02:00
|
|
|
|
|
|
|
# check the window size after each command and, if necessary,
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|