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
f7a95a96
Commit
f7a95a96
authored
Apr 04, 2014
by
Felipe Rodrigues
Committed by
Bruno Pinto
Apr 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added integral theme
parent
e17fdd00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
themes/integral/fish_prompt.fish
themes/integral/fish_prompt.fish
+56
-0
themes/integral/readme.md
themes/integral/readme.md
+10
-0
No files found.
themes/integral/fish_prompt.fish
0 → 100644
View file @
f7a95a96
# name: Integral
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_vs_upstream
set -l count (command git rev-list --count --left-right "origin/$argv"...HEAD ^/dev/null)
switch $count
case "" # no upstream
echo ''
case "0?0" # equal to upstream
echo ''
case "0??" # ahead of upstream
echo u+
case "??0" # behind upstream
echo u-
case '???' # diverged from upstream
echo u+-
end
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l blue (set_color blue)
set -l yellow (set_color yellow)
set -l normal (set_color normal)
set -l green (set_color green)
set -l arrow "∫"
set -l cwd $blue(basename (prompt_pwd))
if [ (_git_branch_name) ]
set -l git_branch (_git_branch_name)
set -l git_vs_upstream (_git_vs_upstream $git_branch)
if [ (_is_git_dirty) ]
set git_info $yellow '('$git_branch "±" "$git_vs_upstream"')' $normal
else if [ (_git_vs_upstream $git_branch) ]
set git_info $yellow '('$git_branch "$git_vs_upstream"')' $normal
else
set git_info $green '('$git_branch')' $normal
end
end
echo -n -s $cwd "$git_info" $normal $arrow ' '
end
function fish_right_prompt
set -l dark_gray (set_color 222)
echo -n -s $dark_gray ' ['(date +%H:%M:%S)'] '
end
themes/integral/readme.md
0 → 100644
View file @
f7a95a96
## integral
A simple git upstream theme.
#### Characteristics
*
Current branch
*
Dirty working directory
*
Working directory
*
Git upstream status
\ No newline at end of file
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