summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-20 00:16:48 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-20 00:16:48 -0700
commit36653f4252e3fe37822645ee1e72a39ae3c43ca5 (patch)
treeee25f0a2c37b46ef1364985cec93cb45563bdc32 /bashrc
parent721a255e6da3a363d90b569c19e7f65bbaa8e355 (diff)
downloaddotfiles-36653f4252e3fe37822645ee1e72a39ae3c43ca5.tar.gz
dotfiles-36653f4252e3fe37822645ee1e72a39ae3c43ca5.tar.xz
Add .bashrc.
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc38
1 files changed, 38 insertions, 0 deletions
diff --git a/bashrc b/bashrc
new file mode 100644
index 0000000..f415b5c
--- /dev/null
+++ b/bashrc
@@ -0,0 +1,38 @@
+if [[ $- != *i* ]]; then
+ return
+fi
+
+shopt -s checkwinsize
+shopt -s histappend
+
+case ${TERM} in
+ xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
+ ;;
+ screen*)
+ PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
+ ;;
+esac
+
+if [[ $(tput colors) -ge 8 ]]; then
+ eval $(dircolors -b)
+
+ if [[ ${EUID} == 0 ]]; then
+ PS1='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] '
+ else
+ PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
+ fi
+
+ alias ls='ls --color=auto'
+ alias grep='grep --colour=auto'
+ alias egrep='egrep --colour=auto'
+ alias fgrep='fgrep --colour=auto'
+else
+ PS1='\u@\h \w \$ '
+fi
+
+export EDITOR=vim
+export HISTSIZE=50000
+
+rpath() { source <(~/dev/rpath/rpath.sh "${@}"); }
+alias rp='rpath'