This commit is contained in:
U-EPSILON8\blecher 2017-01-30 11:15:34 +01:00
commit 805fc73e95
3 changed files with 7 additions and 3 deletions

0
oh-my-zsh.sh Normal file → Executable file
View file

View file

@ -13,7 +13,7 @@ ZSH_THEME="blecher.at-agnoster"
# CASE_SENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

View file

@ -28,6 +28,7 @@
CURRENT_BG='NONE'
SEGMENT_SEPARATOR=''
DIR_COLOR='blue'
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@ -62,7 +63,10 @@ prompt_end() {
# Context: user@hostname (who am I and where am I)
prompt_context() {
local user=`whoami`
if [[ "$user" == "root" ]]; then
DIR_COLOR=red
fi
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$user@%m"
fi
@ -83,7 +87,7 @@ prompt_git() {
# Dir: current working directory
prompt_dir() {
prompt_segment blue black '%~'
prompt_segment $DIR_COLOR black '%~'
}
# Fast method to get the current branch in git from https://gist.github.com/wolever/6525437