added some aliases, removed some functions, ...
[dotfiles] / .bashrc
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3 # for examples
4
5 export PATH=$PATH:/home/nsukami/bin
6
7 # If not running interactively, don't do anything
8 case $- in
9 *i*) ;;
10 *) return;;
11 esac
12
13
14 # make less more friendly for non-text input files, see lesspipe(1)
15 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
16
17 # set variable identifying the chroot you work in (used in the prompt below)
18 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
19 debian_chroot=$(cat /etc/debian_chroot)
20 fi
21
22 # set a fancy prompt (non-color, unless we know we "want" color)
23 case "$TERM" in
24 xterm-color) color_prompt=yes;;
25 esac
26
27 # uncomment for a colored prompt, if the terminal has the capability; turned
28 # off by default to not distract the user: the focus in a terminal window
29 # should be on the output of commands, not on the prompt
30 force_color_prompt=yes
31
32 if [ -n "$force_color_prompt" ]; then
33 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
34 # We have color support; assume it's compliant with Ecma-48
35 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
36 # a case would tend to support setf rather than setaf.)
37 color_prompt=yes
38 else
39 color_prompt=
40 fi
41 fi
42
43 # export command for coloring
44 # '\e[x;ym $PS1 \e[m' or [\033[x;ym\] $PS1 [\033[00m\] x;y being the color pair to use
45
46 if [ "$color_prompt" = yes ]; then
47 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "[%s]") \$ '
48 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(vcprompt -f %b%a%m%u) > '
49 if [ $USER='nsukami' ]; then
50 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
51 PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
52 else
53 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
54 fi
55 else
56 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "[%s]") \$ '
57 if [ $USER='nsukami']; then
58 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
59 PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
60 else
61 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
62 fi
63
64 fi
65 unset color_prompt force_color_prompt
66
67 # If this is an xterm set the title to user@host:dir
68 case "$TERM" in
69 xterm*|rxvt*)
70 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w $(vcprompt -f %b%a%m%u) \a\]$PS1"
71 ;;
72 *)
73 ;;
74 esac
75
76 # enable color support of ls
77 if [ -x /usr/bin/dircolors ]; then
78 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
79 alias ls='ls --color=auto'
80 fi
81
82
83
84 # enable programmable completion features (you don't need to enable
85 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
86 # sources /etc/bash.bashrc).
87 if ! shopt -oq posix; then
88 if [ -f /usr/share/bash-completion/bash_completion ]; then
89 . /usr/share/bash-completion/bash_completion
90 elif [ -f /etc/bash_completion ]; then
91 . /etc/bash_completion
92 fi
93 fi
94
95
96 # Alias definitions.
97 # You may want to put all your additions into a separate file like
98 # ~/.bash_aliases, instead of adding them here directly.
99 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
100 [[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
101
102 # git completion
103 [[ -f ~/.git_completion ]] && . ~/.git_completion
104
105 # personal customization
106 [[ -f ~/.bash_customization ]] && . ~/.bash_customization
107
108 # personal functions
109 [[ -f ~/.bash_function ]] && . ~/.bash_function
110
111 # personal export
112 [[ -f ~/.bash_export ]] && . ~/.bash_export
113
114 # personal color
115 [[ -f ~/.bash_color ]] && . ~/.bash_color
116
117 # personal shopt
118 [[ -f ~/.bash_shopt ]] && . ~/.bash_shopt
119
120 # git completion
121 [[ -f ~/.git_completion ]] && . ~/.git_completion
122
123 # is or is not
124 [[ -f ~/.bash_is ]] && . ~/.bash_is
125
126 # jump to directories
127 [[ -f ~/.bash_marks ]] && . ~/.bash_marks
128
129 # tmux completion script
130 [[ -f ~/.bash_tmux ]] && . ~/.bash_tmux
131
132 # jump completion script
133 [[ -f ~/.bash_compl ]] && . ~/.bash_compl
134
135 # jump completion script
136 [[ -f ~/.bash_base64 ]] && . ~/.bash_base64