-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwalou.alex.bashrc
More file actions
111 lines (95 loc) · 3.31 KB
/
walou.alex.bashrc
File metadata and controls
111 lines (95 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# ~/.bashrc: executed by bash(1) for non-login shells.
# If not running interactively, don't do anything (scp, rcp):
[ -z "$PS1" ] && return
# don't put duplicate lines in the history:
export HISTCONTROL=ignoreboth
# append to the history file and check window's size after each command:
shopt -s histappend
shopt -s checkwinsize
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=50000
HISTFILESIZE=50000
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# man pages more friendly:
export LESS_TERMCAP_mb=$(printf "\e[1;37m")
export LESS_TERMCAP_md=$(printf "\e[1;37m")
export LESS_TERMCAP_me=$(printf "\e[0m")
export LESS_TERMCAP_se=$(printf "\e[0m")
export LESS_TERMCAP_so=$(printf "\e[1;47;30m")
export LESS_TERMCAP_ue=$(printf "\e[0m")
export LESS_TERMCAP_us=$(printf "\e[0;36m")
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt
case "$TERM" in
xterm*|gnome*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
;;
screen*)
PROMPT_COMMAND='echo -ne "\033]0;SCREEN @${HOSTNAME%%.*}\007"'
PS1='\u\[\033[1;33m\]@\[\033[0m\]\h\[\033[1;33m\]:\[\033[0m\] \w\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias zgrep='zgrep --color=auto'
fi
# enable programmable completion features:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# all aliases should go in .bash_aliases:
# basics:
alias ll='ls -lh'
alias lld='ls -ld'
alias la='ls -lash'
alias cc='clear'
alias rs='reset'
alias less='less -n'
if [ -f '/usr/bin/colordiff' ]; then
alias diff='colordiff'
fi
alias em='emacs -nw'
# useless but fun:
alias shitdown='shutdown -h now'
alias steve="jobs -l"
alias killl="echo That\'s a little bit overkill, isn\'t it?"
# kind of useful actually:
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../../..'
alias .3='cd ../../..'
alias ....='cd ../../../..'
alias .4='cd ../../../..'
alias .....='cd ../../../..'
alias .5='cd ../../../../..'
# job related:
alias ftpdepot='ftp ftpdepot.bmc.com'
alias sftpdepot='sftp sftp.bmc.com'
# set PATH so it includes my private bin, hosts-tools and git_projects:
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi
if [ -d ~/git_projects/host-tools ]; then
PATH=~/git_projects/host-tools:"${PATH}"
fi
PATH="/home/alex/perl5/bin${PATH+:}${PATH}"; export PATH;
PERL5LIB="/home/alex/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/alex/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/alex/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/alex/perl5"; export PERL_MM_OPT;
# required for MiniVim
stty -ixon