forked from mudhorn/dotfiles
changed out .bashrc for one from kali linux
This commit is contained in:
parent
ebfd4f08d5
commit
7f48adca67
58
.bashrc
58
.bashrc
|
@ -8,8 +8,6 @@ case $- in
|
|||
*) return;;
|
||||
esac
|
||||
|
||||
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
@ -39,7 +37,7 @@ fi
|
|||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
|
@ -59,56 +57,60 @@ if [ -n "$force_color_prompt" ]; then
|
|||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]"
|
||||
prompt_color='\[\033[;32m\]'
|
||||
info_color='\[\033[1;34m\]'
|
||||
prompt_symbol=📛
|
||||
if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user
|
||||
prompt_color='\[\033[;94m\]'
|
||||
info_color='\[\033[1;31m\]'
|
||||
prompt_symbol=💀
|
||||
fi
|
||||
PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}('$info_color'\u${prompt_symbol}\h'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] '
|
||||
# BackTrack red prompt
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='┌──[\u@\h]─[\w]\n└──╼ \$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
|
||||
# Set 'man' colors
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
man() {
|
||||
env \
|
||||
LESS_TERMCAP_mb=$'\e[01;31m' \
|
||||
LESS_TERMCAP_md=$'\e[01;31m' \
|
||||
LESS_TERMCAP_me=$'\e[0m' \
|
||||
LESS_TERMCAP_se=$'\e[0m' \
|
||||
LESS_TERMCAP_so=$'\e[01;44;33m' \
|
||||
LESS_TERMCAP_ue=$'\e[0m' \
|
||||
LESS_TERMCAP_us=$'\e[01;32m' \
|
||||
man "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]"
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
# enable color support of ls, less and man, and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias diff='diff --color=auto'
|
||||
alias ip='ip --color=auto'
|
||||
|
||||
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
||||
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
||||
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
||||
export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
|
||||
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
||||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias em='emacs -nw'
|
||||
alias dd='dd status=progress'
|
||||
alias _='sudo'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
|
|
|
@ -9,6 +9,7 @@ for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
|
|||
ln -s $PWD/$file ~/$file
|
||||
done
|
||||
|
||||
|
||||
# Check if vim-addon installed, if not, install it automatically
|
||||
if hash vim-addon 2>/dev/null; then
|
||||
echo "vim-addon (vim-scripts) installed"
|
||||
|
|
Loading…
Reference in a new issue