]> git.rmz.io Git - dotfiles.git/blob - bashrc
fuck Xmodmap
[dotfiles.git] / bashrc
1 xhost +local:root > /dev/null 2>&1
2
3 shopt -s cdspell
4 shopt -s checkwinsize
5 shopt -s cmdhist
6 shopt -s dotglob
7 shopt -s expand_aliases
8 shopt -s extglob
9 shopt -s histappend
10 shopt -s hostcomplete
11 # shopt -s nocaseglob # never! lost a file cause of this shit
12
13 export HISTSIZE=10000
14 export HISTFILESIZE=${HISTSIZE}
15 export HISTCONTROL=ignoreboth
16
17 # ex - archive extractor
18 # usage: ex <file>
19 ex ()
20 {
21 if [ -f $1 ] ; then
22 case $1 in
23 *.tar.bz2) tar xjf $1 ;;
24 *.tar.gz) tar xzf $1 ;;
25 *.tar.xz) tar -x --xz -f $1 ;;
26 *.bz2) bunzip2 $1 ;;
27 *.rar) unrar x $1 ;;
28 *.gz) gunzip $1 ;;
29 *.tar) tar xf $1 ;;
30 *.tbz2) tar xjf $1 ;;
31 *.tgz) tar xzf $1 ;;
32 *.zip) unzip $1 ;;
33 *.Z) uncompress $1 ;;
34 *.7z) 7z x $1 ;;
35 *) echo "'$1' cannot be extracted via ex()" ;;
36 esac
37 else
38 echo "'$1' is not a valid file"
39 fi
40 }
41
42 # vim stuff
43 export EDITOR=vim
44 export VISUAL=vim
45
46 # default prompt
47 PS1='[\u@\h \W]\$ '
48
49 # Stuff from ubuntu
50 # make less more friendly for non-text input files, see lesspipe(1)
51 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
52
53 # Alias definitions.
54 [[ -f ~/.aliases ]] && . ~/.aliases
55
56 # set PATH so it includes user's private bin if it exists
57 [[ -d "$HOME/bin" ]] && PATH="$HOME/bin:$PATH"
58
59 # import host specific bashrc
60 [[ -e ~/.bashrc_$(hostname) ]] && . ~/.bashrc_$(hostname)