dotfiles/.bashrc
Alan Orth 8151b68bf2 .bashrc: We must export variables so children can access them
Child processes like `crontab -e` couldn't see that we wanted to
use vim for our editor, as the variable wasn't exported.
2013-06-14 12:40:28 +03:00

32 lines
746 B
Bash

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Aliases
alias ls='ls --color=auto'
alias less='less -R' # preserves colors in `less`
# Environment
PS1='[\u@\h: \w]\$ '
export EDITOR=/usr/bin/vim
export PAGER=/usr/bin/less
# Aggressive read/write of history after every command
PROMPT_COMMAND='history -a; history -n'
# 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