-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwalou.root.bashrc
More file actions
85 lines (73 loc) · 2.48 KB
/
walou.root.bashrc
File metadata and controls
85 lines (73 loc) · 2.48 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
# ~/.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="\[\033[01;32m\]\u@\h \[\033[01;34m\]\W $ \[\033[00m\]"
;;
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
#those should go in .bash_aliases:
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'
export EDITOR="em"
# 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
export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml
source /usr/local/rvm/scripts/rvm