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
6d16880a
Commit
6d16880a
authored
Mar 24, 2014
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #128 from perryh/master
parents
ef9983d4
54a0494b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
themes/perryh/README.md
themes/perryh/README.md
+5
-0
themes/perryh/fish_prompt.fish
themes/perryh/fish_prompt.fish
+43
-0
No files found.
themes/perryh/README.md
0 → 100644
View file @
6d16880a
## perryh
This is similar to godfat's gitstatus theme, but mainly includes red, white, cyan, and yellow.

themes/perryh/fish_prompt.fish
0 → 100644
View file @
6d16880a
# name: perry
# Works best in a black or dark terminal background.
# https://github.com/perryh/oh-my-fish
# Mostly copied from: https://github.com/godfat/fish_prompt-gitstatus
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_status_symbol
set -l git_status (git status --porcelain ^/dev/null)
if test -n "$git_status"
# Is there anyway to preserve newlines so we can reuse $git_status?
if git status --porcelain ^/dev/null | grep '^.[^ ]' >/dev/null
echo '*' # dirty
else
echo '#' # all staged
end
else
echo '' # clean
end
end
function _remote_hostname
set -l red (set_color -o red)
set -l white (set_color -o white)
echo $white(whoami)$red@$white(hostname)
end
function fish_prompt
set -l red (set_color -o red)
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l cwd (set_color $fish_color_cwd)(prompt_pwd)
set -l git_status (_git_status_symbol)(_git_branch_name)
if test -n "$git_status"
set git_status " $git_status"
end
echo -n (_remote_hostname)$red':'$cyan$cwd$yellow$git_status$red'➜ '
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