shellrc for easier scp shit
This commit is contained in:
parent
418e08aa78
commit
047e2592b1
1 changed files with 16 additions and 15 deletions
31
shellrc
31
shellrc
|
@ -170,22 +170,22 @@ if is_zsh; then
|
||||||
zstyle ':vcs_info:*' stagedstr " %F{green}✓%f"
|
zstyle ':vcs_info:*' stagedstr " %F{green}✓%f"
|
||||||
zstyle ':vcs_info:*' unstagedstr " %F{red}✗%f"
|
zstyle ':vcs_info:*' unstagedstr " %F{red}✗%f"
|
||||||
zstyle ':vcs_info:svn*' branchformat '%r'
|
zstyle ':vcs_info:svn*' branchformat '%r'
|
||||||
zstyle ':vcs_info:*' formats "%B%F{yellow}[%f%%b%s%B%F{yellow}: %F{magenta}%r%f %F{yellow}%f%%b %F{yellow}%b%f%u%c%B%F{yellow}]%f%%b"
|
zstyle ':vcs_info:*' formats " %s:%B%F{magenta}%r%f%%b%F{yellow}%b%f%u%c"
|
||||||
fi
|
fi
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ prompt
|
# {{{ prompt
|
||||||
lb='%B%F{yellow}[%f%b'
|
lb='[ '
|
||||||
rb='%B%F{yellow}]%f%b'
|
rb=' ]'
|
||||||
bb='%B%F{yellow} %f%b'
|
bb=':'
|
||||||
prompt_cwd='%B%d%b'
|
prompt_user='%(1000#..%(1205#..%F{red}%n%f%b ))'
|
||||||
prompt_user='%(1000#..%(1205#..%F{red}%n%B%F{yellow}@%f%b))'
|
|
||||||
prompt_host='%m'
|
prompt_host='%m'
|
||||||
prompt_bang='%(!.%F{red}.%F{white})>%f'
|
prompt_cwd='%B%d%b'
|
||||||
prompt_jobs='%(1j.%B%F{yellow}[%f%bjobs: %B%F{red}%j%F{yellow}]%f%b.)'
|
prompt_bang='%(!.%F{red}>%f.%B>%b)'
|
||||||
|
prompt_jobs='%(1j. jobs:%B%F{red}%j%f%b.)'
|
||||||
precmd() {
|
precmd() {
|
||||||
[[ -n ${vcs_enabled} ]] && vcs_info
|
[[ -n ${vcs_enabled} ]] && vcs_info
|
||||||
if [[ -z ${hide_info} ]]; then
|
if [[ -z ${hide_info} ]]; then
|
||||||
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd}${rb}${vcs_info_msg_0_}${prompt_jobs}"
|
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd}${prompt_jobs}${vcs_info_msg_0_}${rb}"
|
||||||
else
|
else
|
||||||
prompt_info=''
|
prompt_info=''
|
||||||
fi
|
fi
|
||||||
|
@ -301,9 +301,10 @@ else
|
||||||
eval "b${colors[$i]}='\[\e[1;3${i}m\]'"
|
eval "b${colors[$i]}='\[\e[1;3${i}m\]'"
|
||||||
done
|
done
|
||||||
reset='\[\e[0m\]'
|
reset='\[\e[0m\]'
|
||||||
lb="${byellow}[${reset}"
|
bold='\[\e[1m\]'
|
||||||
rb="${byellow}]${reset}"
|
lb="[ "
|
||||||
bb="${byellow} ${reset}"
|
rb=" ]"
|
||||||
|
bb=":"
|
||||||
prompt_host="$HOSTNAME"
|
prompt_host="$HOSTNAME"
|
||||||
prompt_bang=">${reset}"
|
prompt_bang=">${reset}"
|
||||||
precmd() {
|
precmd() {
|
||||||
|
@ -312,16 +313,16 @@ else
|
||||||
if [[ ${UID} -eq 1000 || ${UID} -eq 1205 ]]; then
|
if [[ ${UID} -eq 1000 || ${UID} -eq 1205 ]]; then
|
||||||
prompt_user=''
|
prompt_user=''
|
||||||
else
|
else
|
||||||
prompt_user="${nred}\u${byellow}@${reset}"
|
prompt_user="${nred}\u${reset} "
|
||||||
fi
|
fi
|
||||||
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd}${rb}${lb}bash-\v${rb}"
|
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd} | bash-\v${rb}"
|
||||||
else
|
else
|
||||||
prompt_info=''
|
prompt_info=''
|
||||||
fi
|
fi
|
||||||
if [[ $UID -eq 0 ]]; then
|
if [[ $UID -eq 0 ]]; then
|
||||||
prompt_bang_color="${nred}"
|
prompt_bang_color="${nred}"
|
||||||
else
|
else
|
||||||
prompt_bang_color="${nwhite}"
|
prompt_bang_color="${bold}"
|
||||||
fi
|
fi
|
||||||
PS1="${prompt_info}${newline}${prompt_bang_color}${prompt_bang} "
|
PS1="${prompt_info}${newline}${prompt_bang_color}${prompt_bang} "
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue