From 74177c5320b2a1b2f8c4c695c05984b57fd7c6ea Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 9 Oct 2014 13:44:54 +0200 Subject: Change all whoami calls for $USER variable This avoid spawning additional processes, as the $USER variable will **always** contain the current logged-in user. --- themes/ys.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/ys.zsh-theme') diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index a44f295f4..65448964d 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -33,7 +33,7 @@ ${git_info} \ %{$fg[white]%}[%*] %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" -if [[ "$(whoami)" == "root" ]]; then +if [[ "$USER" == "root" ]]; then PROMPT=" %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ %{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ -- cgit v1.2.3-70-g09d2 From 95d795e8cad7d1a754dfad520309d7a41b69275f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 9 Oct 2014 17:05:48 +0200 Subject: Change all hostname calls for $HOST or $SHORT_HOST --- plugins/profiles/profiles.plugin.zsh | 2 +- themes/candy-kingdom.zsh-theme | 2 +- themes/dieter.zsh-theme | 2 +- themes/fino-time.zsh-theme | 2 +- themes/fino.zsh-theme | 2 +- themes/kardan.zsh-theme | 2 +- themes/michelebologna.zsh-theme | 2 +- themes/ys.zsh-theme | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'themes/ys.zsh-theme') diff --git a/plugins/profiles/profiles.plugin.zsh b/plugins/profiles/profiles.plugin.zsh index 8faae6b53..4b3d6a852 100644 --- a/plugins/profiles/profiles.plugin.zsh +++ b/plugins/profiles/profiles.plugin.zsh @@ -2,7 +2,7 @@ # 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) -parts=(${(s:.:)$(hostname)}) +parts=(${(s:.:)$HOST}) for i in {${#parts}..1}; do profile=${(j:.:)${parts[$i,${#parts}]}} file=$ZSH_CUSTOM/profiles/$profile diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 718977d90..889128758 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -13,7 +13,7 @@ patches: