dotfiles/.bashrc

96 lines
2.4 KiB
Bash
Raw Normal View History

2013-03-23 14:48:31 +01:00
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Instead of this, copy:
# /usr/share/terminfo/r/rxvt-unicode into ~/.terminfo/r/rxvt-unicode
# /usr/share/terminfo/r/rxvt-unicode-256color into ~/.terminfo/r/rxvt-unicode-256color
#export TERM=xterm
# Exporting nickname
export USER_NICKNAME="Rodolphe Breard"
# Exporting DEB settings
export DEBEMAIL="rodolphe.breard@uraniborg.net"
export DEBFULLNAME="$USER_NICKNAME"
2013-04-10 02:32:38 +02:00
# Ruby bin directory
if [ -d "$HOME/.gem/ruby" ]; then
for file in $HOME/.gem/ruby/*; do
if [ -d "$file" -a -d "$file/bin" ]; then
export PATH="$PATH:$file/bin"
fi
done
2013-04-10 02:32:38 +02:00
fi
2014-09-26 20:04:25 +02:00
# Custom bin directory
if [ -d "$HOME/bin" ]; then
export PATH="$PATH:$HOME/bin"
fi
2013-04-24 17:16:14 +02:00
# OS
OS_TYPE=$(echo "$OSTYPE" | sed 's/\([a-zA-Z_\-]*\).*/\1/g')
2013-03-23 14:48:31 +01:00
# Colors
2013-04-24 17:16:14 +02:00
if [ "$OS_TYPE" != "freebsd" ]; then
2013-04-24 16:43:50 +02:00
eval $(dircolors -b)
fi
2013-03-23 14:48:31 +01:00
# append to the history file, don't overwrite it
shopt -s histappend
# don't save lines matching the previous history entry
export HISTCONTROL=ignoredups
2013-03-23 14:48:31 +01:00
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Set the prompt
2014-01-14 12:23:34 +01:00
if [ -f /usr/bin/liquidprompt ]; then
unset PROMPT_COMMAND
source /usr/bin/liquidprompt
else
PS1="\[\033[01;31m\]\u\[\033[01;37m\]@\[\033[01;33m\]\h\[\033[01;31m\]->\[\033[00m\] "
#PS1='\u@\h-> '
fi
2013-03-23 14:48:31 +01:00
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
complete -cf sudo
2014-04-04 11:21:51 +02:00
# exporting editor and pager
2013-03-23 14:48:31 +01:00
export EDITOR='emacs'
2014-04-04 11:21:51 +02:00
export PAGER='less'
2013-06-26 15:12:30 +02:00
# rbenv
if hash rbenv 2>/dev/null; then
eval "$(rbenv init -)"
fi
2013-08-23 11:43:48 +02:00
2013-11-13 15:39:59 +01:00
# GPG Agent
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
fi
export GPG_TTY=$(tty)