]> git.rmz.io Git - dotfiles.git/blob - bashrc
finally working makefile
[dotfiles.git] / bashrc
1 if [ -f /etc/bash_completion ]; then
2 . /etc/bash_completion
3 fi
4
5 xhost +local:root > /dev/null 2>&1
6
7 shopt -s cdspell
8 shopt -s checkwinsize
9 shopt -s cmdhist
10 shopt -s dotglob
11 shopt -s expand_aliases
12 shopt -s extglob
13 shopt -s histappend
14 shopt -s hostcomplete
15 # shopt -s nocaseglob # never! lost a file cause of this shit
16
17 export HISTSIZE=10000
18 export HISTFILESIZE=${HISTSIZE}
19 export HISTCONTROL=ignoreboth
20
21 # ex - archive extractor
22 # usage: ex <file>
23 ex ()
24 {
25 if [ -f $1 ] ; then
26 case $1 in
27 *.tar.bz2) tar xjf $1 ;;
28 *.tar.gz) tar xzf $1 ;;
29 *.tar.xz) tar -x --xz -f $1 ;;
30 *.bz2) bunzip2 $1 ;;
31 *.rar) unrar x $1 ;;
32 *.gz) gunzip $1 ;;
33 *.tar) tar xf $1 ;;
34 *.tbz2) tar xjf $1 ;;
35 *.tgz) tar xzf $1 ;;
36 *.zip) unzip $1 ;;
37 *.Z) uncompress $1 ;;
38 *.7z) 7z x $1 ;;
39 *) echo "'$1' cannot be extracted via ex()" ;;
40 esac
41 else
42 echo "'$1' is not a valid file"
43 fi
44 }
45
46 # vim stuff
47 export EDITOR=vim
48 export VISUAL=vim
49
50 # prompt
51 prompt ()
52 {
53 . ~/.bash_colors
54 PS1="[\u@\[${bldred}\]\h\[${bldblu}\] \W\[${txtrst}\]]\[${txtrst}\]\$ "
55 }
56 prompt
57 unset prompt
58
59 # Stuff from ubuntu
60 # make less more friendly for non-text input files, see lesspipe(1)
61 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
62
63 # Alias definitions.
64 # You may want to put all your additions into a separate file like
65 # ~/.bash_aliases, instead of adding them here directly.
66 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
67 if [ -f ~/.bash_aliases ]; then
68 . ~/.bash_aliases
69 fi
70
71 # set PATH so it includes user's private bin if it exists
72 if [ -d "$HOME/bin" ] ; then
73 PATH="$HOME/bin:$PATH"
74 fi