Greatly improved bashrc
This commit is contained in:
parent
6aedad21bb
commit
2abd4a1f64
@ -274,36 +274,7 @@ bakwht='\[\e[47m\]' # White
|
||||
|
||||
txtrst='\[\e[0m\]' # Text Reset
|
||||
|
||||
#History control
|
||||
parse_git_branch() {
|
||||
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | grep -oE '[^ ]+$'
|
||||
}
|
||||
if [ "$BASH" ]; then
|
||||
prompt(){
|
||||
a=`parse_git_branch`
|
||||
hn=`hostname`
|
||||
hn=${hn:0:3}
|
||||
who=`whoami`
|
||||
who=${who:0:3}
|
||||
if [ -z $a ] ; then
|
||||
printf "{$txtgrn%s@%s$txtrst}{$txtred%s$txtrst}>" $who $hn "$PWD"
|
||||
else
|
||||
printf "{$txtgrn%s@%s$txtrst}{$txtred%s$txtrst}{$txtblu%s$txtrst}>" $who $hn "$PWD" $(parse_git_branch)
|
||||
fi
|
||||
}
|
||||
PS1=""
|
||||
PROMPT_COMMAND='PS1=`prompt`'
|
||||
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo "`date +'%y.%m.%d-%H:%M:%S:'`" $USER "$(pwd)" "$(history 1 | cut -c8-)" >> ~/.bash_eternal_history'
|
||||
export HISTFILESIZE=
|
||||
export HISTSIZE=
|
||||
export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S "
|
||||
export HISTFILE=~/.bash_eternal_history
|
||||
alias ehistory='cat ~/.bash_eternal_history|grep $@'
|
||||
readonly HOME
|
||||
readonly HISTIGNORE
|
||||
#readonly PROMPT_COMMAND
|
||||
#readonly HISTSIZE
|
||||
#readonly HISTFILE
|
||||
#readonly HISTCONTROL
|
||||
fi
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
[ -f ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-stonewareslord-SLASH-oh-my-git.git/prompt.sh ]&&source ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-stonewareslord-SLASH-oh-my-git.git/prompt.sh
|
||||
[ -f ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-stonewareslord-SLASH-liquidprompt.git/liquidprompt ]&&source ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-stonewareslord-SLASH-liquidprompt.git/liquidprompt
|
||||
export finally=
|
||||
|
@ -5,5 +5,7 @@ LP_ENABLE_SSH_COLORS=1
|
||||
LP_USER_ALWAYS=0
|
||||
LP_ENABLE_OHMYGIT=1
|
||||
LP_ENABLE_BATT=1
|
||||
LP_ENABLE_JOBS=0
|
||||
LP_ENABLE_JOBS=1
|
||||
LP_ENABLE_SHORTEN_PATH=0
|
||||
#LP_ENABLE_RUNTIME=1
|
||||
# vim: ft=sh:
|
||||
|
@ -22,6 +22,7 @@ antigen use oh-my-zsh
|
||||
antigen theme stonewareslord/oh-my-git-themes af-magic
|
||||
antigen bundle stonewareslord/liquidprompt
|
||||
antigen bundle zsh-users/zsh-completions src
|
||||
antigen bundle sharat87/autoenv
|
||||
antigen apply
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
|
Loading…
Reference in New Issue
Block a user