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
afe748e4
Commit
afe748e4
authored
May 10, 2015
by
Pablo Santiago Blum de Aguiar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refact(scorphish): colorize prompt arrows according to exit code
parent
239f8dd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
themes/scorphish/fish_prompt.fish
themes/scorphish/fish_prompt.fish
+19
-11
No files found.
themes/scorphish/fish_prompt.fish
View file @
afe748e4
...
...
@@ -55,6 +55,8 @@ function _git_dirty_remotes -a remote_color -a ahead_color
end
function fish_prompt
set -l exit_code $status
set_color -o 666
printf '['
set_color -o blue
...
...
@@ -72,9 +74,9 @@ function fish_prompt
set_color -o 666
if set -q SCORPHISH_GIT_INFO_ON_FIRST_LINE
printf
"]"
printf
']'
else
printf
"]\n"
printf
']\n'
end
set -l gray (set_color 666)
...
...
@@ -100,18 +102,24 @@ function fish_prompt
end
end
set_color 060
if test $exit_code -ne 0
set arrow_colors 600 900 c00 f00
else
set arrow_colors 060 090 0c0 0f0
end
if set -q SCORPHISH_GIT_INFO_ON_FIRST_LINE
printf
"\n»"
printf
'\n'
else
printf
" »"
printf
' '
end
set_color 090
printf '»'
set_color 0c0
printf '»'
set_color 0f0
printf '» '
for arrow_color in $arrow_colors
set_color $arrow_color
printf '»'
end
printf ' '
set_color 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