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
beb7a538
Commit
beb7a538
authored
Aug 03, 2014
by
Joseph Tannhuber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git branch segment improved
parent
c3ca7d21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
themes/budspencer/fish_prompt.fish
themes/budspencer/fish_prompt.fish
+8
-3
No files found.
themes/budspencer/fish_prompt.fish
View file @
beb7a538
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
###############################################################################
###############################################################################
# Color definitions
# Color definitions
###############################################################################
###############################################################################
set -g budspencer_colors 000000 002b36 083743 445659 657b83 839496 93a1a1 eee8d5 fdf6e3 b58900 cb4b16 dc121f d33682
6c71c4 268bd2 2aa198 859900
set -g budspencer_colors 000000 002b36 083743 445659 657b83 839496 93a1a1 eee8d5 fdf6e3 b58900 cb4b16 dc121f af005f
6c71c4 268bd2 2aa198 859900
###############################################################################
###############################################################################
# Utils
# Utils
...
@@ -13,7 +13,12 @@
...
@@ -13,7 +13,12 @@
set -g __budspencer_display_rprompt 1
set -g __budspencer_display_rprompt 1
function __budspencer_git_branch_name -d "Return the current branch name"
function __budspencer_git_branch_name -d "Return the current branch name"
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
set -l branch (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
if test (count $branch) -eq 0
echo -n (set_color -b $budspencer_colors[14])""(set_color $budspencer_colors[1])" "(git describe --contains --all HEAD ^/dev/null)" "(set_color $budspencer_colors[14])
else
echo -n (set_color -b $budspencer_colors[4])""(set_color $budspencer_colors[1])" "$branch" "(set_color $budspencer_colors[4])
end
end
end
function fish_vi_prompt_cm --description "Displays the current mode"
function fish_vi_prompt_cm --description "Displays the current mode"
...
@@ -95,7 +100,7 @@ function fish_prompt -d "Write out the left prompt of the budspencer theme"
...
@@ -95,7 +100,7 @@ function fish_prompt -d "Write out the left prompt of the budspencer theme"
set -l ps_git ""
set -l ps_git ""
set -l git_branch_name (__budspencer_git_branch_name)
set -l git_branch_name (__budspencer_git_branch_name)
if test -n "$git_branch_name"
if test -n "$git_branch_name"
set ps_git
(set_color -b $budspencer_colors[4]) "" (set_color $budspencer_colors[1]) " "$git_branch_name" " (set_color $budspencer_colors[4]) #"@"$colbred$git_repo
_name
set ps_git
$git_branch
_name
end
end
set -l ps_symbols (fish_prompt_symbols)
set -l ps_symbols (fish_prompt_symbols)
...
...
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