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
e581bbb0
Commit
e581bbb0
authored
May 31, 2014
by
James Hillyerd
Committed by
Bruno Pinto
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add yimmy theme
parent
b2003fcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
themes/yimmy/README.md
themes/yimmy/README.md
+15
-0
themes/yimmy/fish_prompt.fish
themes/yimmy/fish_prompt.fish
+47
-0
No files found.
themes/yimmy/README.md
0 → 100644
View file @
e581bbb0
## yimmy
A simple two-line theme best displayed on a terminal configured with Solarized
Dark colors. Displays:
user@host cwd (branch)
%
Characteristics:
-
Uses the fish prompt_pwd, so paths will be abbreviated
-
Git branch name will be followed by a red + if dirty
-
Indicates Git work-in-progress (gwip/gunwip) if detected
-
Tradition bourne prompt characters: $ for user, # for root
-
Prompt character is colored red if previous command had a non-zero exit
status
themes/yimmy/fish_prompt.fish
0 → 100644
View file @
e581bbb0
function fish_prompt
set -l last_status $status
set -l normal (set_color normal)
set -l red (set_color red)
set -l cyan (set_color cyan)
set -l white (set_color white)
set -l gray (set_color -o cyan)
set -l green (set_color green)
set -l brwhite (set_color -o white)
# Color prompt char red if something failed
set -l pcolor $red
if test $last_status = 0
set pcolor $gray
end
# Traditional prompt chars
set -l pchar '$'
if test (id -u) = '0'
set pchar = '#'
end
# Determine git branch
set -l git_branch (begin
git symbolic-ref HEAD; or \
git rev-parse --short HEAD
end ^/dev/null | sed -e 's|^refs/heads/||')
# Line 1
echo -n $red'┌'$cyan$USER$white'@'$cyan(hostname -s)' '$gray(prompt_pwd)$normal
if test -n "$git_branch"
echo -n ' '$green'('$git_branch
set -l dirty (command git status -s --ignore-submodules=dirty ^/dev/null | tail -n1)
if test -n "$dirty"
echo -n $red'+'
end
echo -n $green')'
# Check for gwip; does last commit log contain --wip--?
if begin git log -n 1 ^/dev/null | grep -qc "\-\-wip\-\-"; end
echo -n $brwhite' WIP!'$normal
end
end
echo
# Line 2
echo -n $red'└'$pcolor$pchar' '$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