Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
8d2b9d10
Commit
8d2b9d10
authored
Jan 09, 2011
by
Suraj N. Kurapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid forking subshell to test if user is root
parent
7a9cc198
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
afowler.zsh-theme
themes/afowler.zsh-theme
+1
-1
arrow.zsh-theme
themes/arrow.zsh-theme
+1
-1
clean.zsh-theme
themes/clean.zsh-theme
+1
-1
dst.zsh-theme
themes/dst.zsh-theme
+1
-1
jreese.zsh-theme
themes/jreese.zsh-theme
+1
-1
philips.zsh-theme
themes/philips.zsh-theme
+1
-1
pmcgee.zsh-theme
themes/pmcgee.zsh-theme
+1
-1
No files found.
themes/afowler.zsh-theme
View file @
8d2b9d10
if [
"$(whoami)" = "root"
]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
if [
$UID -eq 0
]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
...
...
themes/arrow.zsh-theme
View file @
8d2b9d10
if [
"$(whoami)" = "root"
]; then NCOLOR="red"; else NCOLOR="yellow"; fi
if [
$UID -eq 0
]; then NCOLOR="red"; else NCOLOR="yellow"; fi
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}'
RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}'
...
...
themes/clean.zsh-theme
View file @
8d2b9d10
if [
"$(whoami)" = "root"
]; then NCOLOR="red"; else NCOLOR="white"; fi
if [
$UID -eq 0
]; then NCOLOR="red"; else NCOLOR="white"; fi
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
RPROMPT='[%*]'
RPROMPT='[%*]'
...
...
themes/dst.zsh-theme
View file @
8d2b9d10
...
@@ -5,7 +5,7 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
...
@@ -5,7 +5,7 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
function prompt_char {
function prompt_char {
if [
"$(whoami)" = "root"
]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
if [
$UID -eq 0
]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
}
}
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
...
...
themes/jreese.zsh-theme
View file @
8d2b9d10
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png
if [
"$(whoami)" = "root"
]; then NCOLOR="red"; else NCOLOR="green"; fi
if [
$UID -eq 0
]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
...
...
themes/philips.zsh-theme
View file @
8d2b9d10
if [
"$(whoami)" = "root"
]; then NCOLOR="red"; else NCOLOR="green"; fi
if [
$UID -eq 0
]; then NCOLOR="red"; else NCOLOR="green"; fi
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
RPROMPT='[%*]'
RPROMPT='[%*]'
...
...
themes/pmcgee.zsh-theme
View file @
8d2b9d10
if [
"$(whoami)" = "root"
]; then NCOLOR="red"; else NCOLOR="green"; fi
if [
$UID -eq 0
]; then NCOLOR="red"; else NCOLOR="green"; fi
PROMPT='
PROMPT='
%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
...
...
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