Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Oh my ViaRézo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViaRézo
Oh my ViaRézo
Commits
ad479d17
Commit
ad479d17
authored
8 years ago
by
Ayaz Badouraly
Browse files
Options
Downloads
Patches
Plain Diff
Using built-in ternary expression in context prompt
parent
b51e95e2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
via.zsh-theme
+3
-11
3 additions, 11 deletions
via.zsh-theme
with
3 additions
and
11 deletions
via.zsh-theme
+
3
−
11
View file @
ad479d17
...
...
@@ -36,22 +36,14 @@ set_default OHMYVIA_VCS_THEME "default"
local
clock
=
"%B%F{cyan}
$OHMYVIA_TIME_FORMAT
%f%b"
# Check the UID
if
[[
$UID
-ne
0
]]
;
then
# normal user
local
user
=
"%B%F{red}%n%f%b"
local
eol
=
"%B%(?.%F{yellow}.%F{red})%%%f%b"
else
# root
local
user
=
"%B%F{blue}%n%f%b"
local
eol
=
"%B%(?.%F{yellow}.%F{red})#%f%b"
fi
local
user
=
"%B%(!.%F{blue}.%F{red})%n%f%b"
local
user_host
=
"
${
user
}
%B%F{yellow}@%F{white}%m%f%b"
local
current_dir
=
"%B%F{green}%~%f%b"
local
eol
=
"%B%(?.%F{yellow}.%F{red})%#%f%b"
PROMPT
=
'${clock} ${user_host} ${current_dir}${eol} '
# Display vcs info
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment