1
0
Fork 0

bashrc to be used as my main shell

This commit is contained in:
Von Random 2016-08-29 00:10:11 +03:00
parent 3ac32d9fec
commit 79b980711e

13
bashrc
View file

@ -12,6 +12,7 @@ unset local_bin vscripts gem_bin
dotfiles="${HOME}/vdotfiles" dotfiles="${HOME}/vdotfiles"
#comp_enabled=true #comp_enabled=true
#git_enabled=true
HISTSIZE=1000 HISTSIZE=1000
HISTFILE="${HOME}/.bash_history.${UID}" HISTFILE="${HOME}/.bash_history.${UID}"
@ -36,7 +37,7 @@ color_number=0
for color in 'black' 'red' 'green' 'yellow' 'blue' 'magenta' 'cyan' 'white'; do for color in 'black' 'red' 'green' 'yellow' 'blue' 'magenta' 'cyan' 'white'; do
eval "n${color}='\[\e[0;3${color_number}m\]'" eval "n${color}='\[\e[0;3${color_number}m\]'"
eval "b${color}='\[\e[1;3${color_number}m\]'" eval "b${color}='\[\e[1;3${color_number}m\]'"
let color_number+=1 (( x++ ))
done done
unset color_number unset color_number
reset='\[\e[0m\]' reset='\[\e[0m\]'
@ -51,7 +52,7 @@ if [[ $UID -eq 0 ]]; then
else else
color_bang="${bold}" color_bang="${bold}"
fi fi
PS1="[ ${prompt_user}${HOSTNAME}:${bold}${PWD}${reset} ] PS1="[ ${prompt_user}${HOSTNAME}:${bold}\w${reset} ]
${color_bang}>${reset} " ${color_bang}>${reset} "
# }}} # }}}
# {{{ key bindings # {{{ key bindings
@ -132,10 +133,16 @@ alias atmux='command tmux -2 attach'
# }}} # }}}
# {{{ plugins # {{{ plugins
completion_path='/usr/share/bash-completion/bash_completion' completion_path='/usr/share/bash-completion/bash_completion'
git_prompt_path='/usr/lib/bash-git-prompt/gitprompt.sh'
if [[ -n ${comp_enabled} && -r ${completion_path} ]]; then if [[ -n ${comp_enabled} && -r ${completion_path} ]]; then
source ${completion_path} source ${completion_path}
fi fi
unset completion_path if [[ -n ${git_enabled} && -r ${git_prompt_path} ]]; then
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Solarized
source ${git_prompt_path}
fi
unset completion_path git_prompt_path
# }}} # }}}
# {{{ traps # {{{ traps
# we want to see exit code on error (it also has to be the last entry here) # we want to see exit code on error (it also has to be the last entry here)