diff --git a/lib/directories.zsh b/lib/directories.zsh index 0ecb36811..415401eb5 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -6,6 +6,8 @@ setopt auto_name_dirs # Auto add variable-stored paths to ~ list. setopt multios # Write to multiple descriptors. alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' alias cd..='cd ..' alias cd...='cd ../..' alias cd....='cd ../../..' diff --git a/themes/ashleydev.zsh-theme b/themes/ashleydev.zsh-theme index de9ba0133..29680a88d 100644 --- a/themes/ashleydev.zsh-theme +++ b/themes/ashleydev.zsh-theme @@ -30,14 +30,23 @@ if [[ "$DISABLE_COLOR" != "true" ]]; then local _Cstash_="" # stash state # PROMPT colors: - local _Cuser_root_="%{$fg_bold[yellow]$bg[red]%}" - local _Chost_root_="%{$fg[red]%}" - local _Cpath_root_="%{$fg_bold[white]%}" local _Cuser_="%{$fg_bold[cyan]%}" local _Chost_="%{$fg_bold[blue]%}" local _Cpath_="%{$fg_bold[white]%}" local _Cjobs_="%{$fg[blue]%}" + if [[ "`uname -a`" = *CYGWIN* ]]; then + local _Cuser_="%{$fg[green]%}" + local _Chost_="%{$fg_bold[yellow]%}" + local _Cpath_=" %{$fg[yellow]%}" + fi + + if [[ "`whoami`" = root ]]; then + local _Cuser_="%{$fg_bold[yellow]$bg[red]%}" + local _Chost_="%{$fg[red]%}" + local _Cpath_="%{$fg_bold[white]%}" + fi + # RPROMPT colors: local _Cdate_="%{$fg[green]%}" local _Creturn_code_="%{$fg[red]%}" @@ -47,9 +56,9 @@ fi #-------------------- PROMPT definition: ---------------------- # -local user_="%(!.$_Cuser_root_.$_Cuser_)%n$R" -local host_="%(!.$_Chost_root_.$_Chost_)%m$R" -local path_="%(!.$_Cpath_root_.$_Cpath_)%~$R" +local user_="$_Cuser_%n$R" +local host_="$_Chost_%m$R" +local path_="$_Cpath_%~$R" local jobs_="%(1j.$_Cjobs_%j$R.)" PROMPT='$user_$host_$path_ $GIT_PROMPT_INFO$jobs_# '