Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
521a6e38
Commit
521a6e38
authored
Dec 06, 2014
by
Charles B Johnson
Committed by
Bruno Pinto
Dec 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cbjohnson theme.
parent
c65a0dbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
themes/cbjohnson/README.md
themes/cbjohnson/README.md
+8
-0
themes/cbjohnson/fish_prompt.fish
themes/cbjohnson/fish_prompt.fish
+45
-0
No files found.
themes/cbjohnson/README.md
0 → 100644
View file @
521a6e38
## cbjohnson theme
A minimal theme forked from the
[
yimmy
][
yimmy-commit
]
theme (thanks
[
jhillyerd
][
yimmy-author
]
!)

[
yimmy-commit
]:
https://github.com/bpinto/oh-my-fish/tree/3a4b7de689cabf3522227f51177a489d915c8b4d/themes/yimmy
[
yimmy-author
]:
https://github.com/jhillyerd
themes/cbjohnson/fish_prompt.fish
0 → 100644
View file @
521a6e38
function fish_prompt
# Cache exit status
set -l last_status $status
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt_char
switch (id -u)
case 0
set -g __fish_prompt_char \u276f\u276f
case '*'
set -g __fish_prompt_char »
end
end
# Setup colors
set -l normal (set_color normal)
set -l cyan (set_color cyan)
set -l yellow (set_color yellow)
set -l bpurple (set_color -o purple)
set -l bred (set_color -o red)
set -l bcyan (set_color -o cyan)
set -l bwhite (set_color -o white)
# Configure __fish_git_prompt
set -g __fish_git_prompt_show_informative_status true
set -g __fish_git_prompt_showcolorhints true
# Color prompt char red for non-zero exit status
set -l pcolor $bpurple
if [ $last_status -ne 0 ]
set pcolor $bred
end
# Top
echo -n $cyan$USER$normal at $yellow$__fish_prompt_hostname$normal in $bred(prompt_pwd)$normal
__fish_git_prompt
echo
# Bottom
echo -n $pcolor$__fish_prompt_char $normal
end
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