Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
95d795e8
Commit
95d795e8
authored
Oct 09, 2014
by
Marc Cornellà
Browse files
Change all hostname calls for $HOST or $SHORT_HOST
parent
4310a15d
Changes
8
Show whitespace changes
Inline
Side-by-side
plugins/profiles/profiles.plugin.zsh
View file @
95d795e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# This will look for a custom profile for the local machine and each domain or
# This will look for a custom profile for the local machine and each domain or
# subdomain it belongs to. (e.g. com, example.com and foo.example.com)
# subdomain it belongs to. (e.g. com, example.com and foo.example.com)
parts
=(
${
(s
:.:
)
$
(
hostname
)
}
)
parts
=(
${
(s
:.:
)
$
HOST
}
)
for
i
in
{
${#
parts
}
..1
}
;
do
for
i
in
{
${#
parts
}
..1
}
;
do
profile
=
${
(j
:.:
)
${
parts
[
$i
,
${#
parts
}
]
}}
profile
=
${
(j
:.:
)
${
parts
[
$i
,
${#
parts
}
]
}}
file
=
$ZSH_CUSTOM
/profiles/
$profile
file
=
$ZSH_CUSTOM
/profiles/
$profile
...
...
themes/candy-kingdom.zsh-theme
View file @
95d795e8
...
@@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
...
@@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
}
}
function box_name {
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name ||
hostname -s
[ -f ~/.box-name ] && cat ~/.box-name ||
echo $SHORT_HOST || echo $HOST
}
}
PROMPT='
PROMPT='
...
...
themes/dieter.zsh-theme
View file @
95d795e8
...
@@ -21,7 +21,7 @@ local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
...
@@ -21,7 +21,7 @@ local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
# Hostname part. compressed and colorcoded per host_repr array
# Hostname part. compressed and colorcoded per host_repr array
# if not found, regular hostname in default color
# if not found, regular hostname in default color
local host="@${host_repr[$
(hostname)]:-$(hostname)
}%{$reset_color%}"
local host="@${host_repr[$
HOST]:-$HOST
}%{$reset_color%}"
# Compacted $PWD
# Compacted $PWD
local pwd="%{$fg[blue]%}%c%{$reset_color%}"
local pwd="%{$fg[blue]%}%c%{$reset_color%}"
...
...
themes/fino-time.zsh-theme
View file @
95d795e8
...
@@ -21,7 +21,7 @@ function prompt_char {
...
@@ -21,7 +21,7 @@ function prompt_char {
}
}
function box_name {
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name ||
hostname -s
[ -f ~/.box-name ] && cat ~/.box-name ||
echo $SHORT_HOST || echo $HOST
}
}
...
...
themes/fino.zsh-theme
View file @
95d795e8
...
@@ -17,7 +17,7 @@ function prompt_char {
...
@@ -17,7 +17,7 @@ function prompt_char {
}
}
function box_name {
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name ||
hostname -s
[ -f ~/.box-name ] && cat ~/.box-name ||
echo $SHORT_HOST || echo $HOST
}
}
local ruby_env=''
local ruby_env=''
...
...
themes/kardan.zsh-theme
View file @
95d795e8
# Simple theme based on my old zsh settings.
# Simple theme based on my old zsh settings.
function get_host {
function get_host {
echo '@'
`hostname`''
echo '@'
$HOST
}
}
PROMPT='> '
PROMPT='> '
...
...
themes/michelebologna.zsh-theme
View file @
95d795e8
...
@@ -17,7 +17,7 @@ USERNAME_NORMAL_COLOR=$WHITE
...
@@ -17,7 +17,7 @@ USERNAME_NORMAL_COLOR=$WHITE
USERNAME_ROOT_COLOR=$RED
USERNAME_ROOT_COLOR=$RED
HOSTNAME_NORMAL_COLOR=$BLUE
HOSTNAME_NORMAL_COLOR=$BLUE
# uncomment next line if you want auto-generated hostname color
# uncomment next line if you want auto-generated hostname color
#for i in
`hostname`
; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
#for i in
$HOST
; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
HOSTNAME_ROOT_COLOR=$RED
HOSTNAME_ROOT_COLOR=$RED
HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
CURRENT_DIR_COLOR=$CYAN
CURRENT_DIR_COLOR=$CYAN
...
...
themes/ys.zsh-theme
View file @
95d795e8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
# Machine name.
# Machine name.
function box_name {
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name ||
hostname
[ -f ~/.box-name ] && cat ~/.box-name ||
echo $HOST
}
}
# Directory info.
# Directory info.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment