mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
add ... alias. add cygwin colors to ashleydev theme.
This commit is contained in:
parent
47fc51e08a
commit
1cb074f040
2 changed files with 17 additions and 6 deletions
|
|
@ -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 ../../..'
|
||||
|
|
|
|||
|
|
@ -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_# '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue