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
8b662732
Commit
8b662732
authored
May 14, 2014
by
Justin Hileman
Committed by
Bruno Pinto
May 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Namespace all the bobthefishes.
parent
3de8d837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
54 deletions
+54
-54
themes/bobthefish/fish_prompt.fish
themes/bobthefish/fish_prompt.fish
+54
-54
No files found.
themes/bobthefish/fish_prompt.fish
View file @
8b662732
...
@@ -15,40 +15,40 @@
...
@@ -15,40 +15,40 @@
# set -g theme_display_user yes
# set -g theme_display_user yes
# set -g default_user your_normal_user
# set -g default_user your_normal_user
set -g current_bg NONE
set -g
__bobthefish_
current_bg NONE
# Powerline glyphs
# Powerline glyphs
set branch_glyph \uE0A0
set
__bobthefish_
branch_glyph \uE0A0
set ln_glyph \uE0A1
set
__bobthefish_
ln_glyph \uE0A1
set padlock_glyph \uE0A2
set
__bobthefish_
padlock_glyph \uE0A2
set right_black_arrow_glyph \uE0B0
set
__bobthefish_
right_black_arrow_glyph \uE0B0
set right_arrow_glyph \uE0B1
set
__bobthefish_
right_arrow_glyph \uE0B1
set left_black_arrow_glyph \uE0B2
set
__bobthefish_
left_black_arrow_glyph \uE0B2
set left_arrow_glyph \uE0B3
set
__bobthefish_
left_arrow_glyph \uE0B3
# Additional glyphs
# Additional glyphs
set detached_glyph \u27A6
set
__bobthefish_
detached_glyph \u27A6
set nonzero_exit_glyph '! '
set
__bobthefish_
nonzero_exit_glyph '! '
set superuser_glyph '$ '
set
__bobthefish_
superuser_glyph '$ '
set bg_job_glyph '% '
set
__bobthefish_
bg_job_glyph '% '
# Colors
# Colors
set lt_green addc10
set
__bobthefish_
lt_green addc10
set med_green 189303
set
__bobthefish_
med_green 189303
set dk_green 0c4801
set
__bobthefish_
dk_green 0c4801
set lt_red C99
set
__bobthefish_
lt_red C99
set med_red ce000f
set
__bobthefish_
med_red ce000f
set dk_red 600
set
__bobthefish_
dk_red 600
set slate_blue 255e87
set
__bobthefish_
slate_blue 255e87
set lt_orange f6b117
set
__bobthefish_
lt_orange f6b117
set dk_orange 3a2a03
set
__bobthefish_
dk_orange 3a2a03
set dk_grey 333
set
__bobthefish_
dk_grey 333
set med_grey 999
set
__bobthefish_
med_grey 999
set lt_grey ccc
set
__bobthefish_
lt_grey ccc
# ===========================
# ===========================
# Helper methods
# Helper methods
...
@@ -62,9 +62,9 @@ function __bobthefish_git_branch -d 'Get the current git branch (or commitish)'
...
@@ -62,9 +62,9 @@ function __bobthefish_git_branch -d 'Get the current git branch (or commitish)'
set -l ref (command git symbolic-ref HEAD 2> /dev/null)
set -l ref (command git symbolic-ref HEAD 2> /dev/null)
if [ $status -gt 0 ]
if [ $status -gt 0 ]
set -l branch (command git show-ref --head -s --abbrev |head -n1 2> /dev/null)
set -l branch (command git show-ref --head -s --abbrev |head -n1 2> /dev/null)
set ref "$detached_glyph $branch"
set ref "$
__bobthefish_
detached_glyph $branch"
end
end
echo $ref | sed "s-refs/heads/-$branch_glyph -"
echo $ref | sed "s-refs/heads/-$
__bobthefish_
branch_glyph -"
end
end
function __bobthefish_pretty_parent -d 'Print a parent directory, shortened to fit the prompt'
function __bobthefish_pretty_parent -d 'Print a parent directory, shortened to fit the prompt'
...
@@ -88,29 +88,29 @@ end
...
@@ -88,29 +88,29 @@ end
function __bobthefish_start_segment -d 'Start a prompt segment'
function __bobthefish_start_segment -d 'Start a prompt segment'
set_color -b $argv[1]
set_color -b $argv[1]
set_color $argv[2]
set_color $argv[2]
if [ "$current_bg" = 'NONE' ]
if [ "$
__bobthefish_
current_bg" = 'NONE' ]
# If there's no background, just start one
# If there's no background, just start one
echo -n ' '
echo -n ' '
else
else
# If there's already a background...
# If there's already a background...
if [ "$argv[1]" = "$current_bg" ]
if [ "$argv[1]" = "$
__bobthefish_
current_bg" ]
# and it's the same color, draw a separator
# and it's the same color, draw a separator
echo -n "$right_arrow_glyph "
echo -n "$
__bobthefish_
right_arrow_glyph "
else
else
# otherwise, draw the end of the previous segment and the start of the next
# otherwise, draw the end of the previous segment and the start of the next
set_color $current_bg
set_color $
__bobthefish_
current_bg
echo -n "$right_black_arrow_glyph "
echo -n "$
__bobthefish_
right_black_arrow_glyph "
set_color $argv[2]
set_color $argv[2]
end
end
end
end
set current_bg $argv[1]
set
__bobthefish_
current_bg $argv[1]
end
end
function __bobthefish_path_segment -d 'Display a shortened form of a directory'
function __bobthefish_path_segment -d 'Display a shortened form of a directory'
if test -w "$argv[1]"
if test -w "$argv[1]"
__bobthefish_start_segment $
dk_grey $
med_grey
__bobthefish_start_segment $
__bobthefish_dk_grey $__bobthefish_
med_grey
else
else
__bobthefish_start_segment $
dk_red $
lt_red
__bobthefish_start_segment $
__bobthefish_dk_red $__bobthefish_
lt_red
end
end
set -l directory
set -l directory
...
@@ -134,13 +134,13 @@ function __bobthefish_path_segment -d 'Display a shortened form of a directory'
...
@@ -134,13 +134,13 @@ function __bobthefish_path_segment -d 'Display a shortened form of a directory'
end
end
function __bobthefish_finish_segments -d 'Close open prompt segments'
function __bobthefish_finish_segments -d 'Close open prompt segments'
if [ -n $
current_bg -a $
current_bg != 'NONE' ]
if [ -n $
__bobthefish_current_bg -a $__bobthefish_
current_bg != 'NONE' ]
set_color -b normal
set_color -b normal
set_color $current_bg
set_color $
__bobthefish_
current_bg
echo -n "$right_black_arrow_glyph "
echo -n "$
__bobthefish_
right_black_arrow_glyph "
set_color normal
set_color normal
end
end
set -g current_bg NONE
set -g
__bobthefish_
current_bg NONE
end
end
...
@@ -155,18 +155,18 @@ function __bobthefish_prompt_status -d 'Display symbols for a non zero exit stat
...
@@ -155,18 +155,18 @@ function __bobthefish_prompt_status -d 'Display symbols for a non zero exit stat
# Last exit was nonzero
# Last exit was nonzero
if [ $RETVAL -ne 0 ]
if [ $RETVAL -ne 0 ]
set nonzero $nonzero_exit_glyph
set nonzero $
__bobthefish_
nonzero_exit_glyph
end
end
# if superuser (uid == 0)
# if superuser (uid == 0)
set -l uid (id -u $USER)
set -l uid (id -u $USER)
if [ $uid -eq 0 ]
if [ $uid -eq 0 ]
set superuser $superuser_glyph
set superuser $
__bobthefish_
superuser_glyph
end
end
# Jobs display
# Jobs display
if [ (jobs -l | wc -l) -gt 0 ]
if [ (jobs -l | wc -l) -gt 0 ]
set bg_jobs $bg_job_glyph
set bg_jobs $
__bobthefish_
bg_job_glyph
end
end
set -l status_flags "$nonzero$superuser$bg_jobs"
set -l status_flags "$nonzero$superuser$bg_jobs"
...
@@ -174,18 +174,18 @@ function __bobthefish_prompt_status -d 'Display symbols for a non zero exit stat
...
@@ -174,18 +174,18 @@ function __bobthefish_prompt_status -d 'Display symbols for a non zero exit stat
if test "$nonzero" -o "$superuser" -o "$bg_jobs"
if test "$nonzero" -o "$superuser" -o "$bg_jobs"
__bobthefish_start_segment fff 000
__bobthefish_start_segment fff 000
if [ "$nonzero" ]
if [ "$nonzero" ]
set_color $med_red --bold
set_color $
__bobthefish_
med_red --bold
echo -n $nonzero_exit_glyph
echo -n $
__bobthefish_
nonzero_exit_glyph
end
end
if [ "$superuser" ]
if [ "$superuser" ]
set_color $med_green --bold
set_color $
__bobthefish_
med_green --bold
echo -n $superuser_glyph
echo -n $
__bobthefish_
superuser_glyph
end
end
if [ "$bg_jobs" ]
if [ "$bg_jobs" ]
set_color $slate_blue --bold
set_color $
__bobthefish_
slate_blue --bold
echo -n $bg_job_glyph
echo -n $
__bobthefish_
bg_job_glyph
end
end
end
end
end
end
...
@@ -193,7 +193,7 @@ end
...
@@ -193,7 +193,7 @@ end
function __bobthefish_prompt_user -d 'Display actual user if different from $default_user'
function __bobthefish_prompt_user -d 'Display actual user if different from $default_user'
if [ "$theme_display_user" = 'yes' ]
if [ "$theme_display_user" = 'yes' ]
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
__bobthefish_start_segment $
lt_grey $
slate_blue
__bobthefish_start_segment $
__bobthefish_lt_grey $__bobthefish_
slate_blue
echo -n -s (whoami) '@' (hostname | cut -d . -f 1) ' '
echo -n -s (whoami) '@' (hostname | cut -d . -f 1) ' '
end
end
end
end
...
@@ -212,15 +212,15 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
...
@@ -212,15 +212,15 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
set -l flags "$dirty$staged$stashed$ahead$new"
set -l flags "$dirty$staged$stashed$ahead$new"
test "$flags"; and set flags " $flags"
test "$flags"; and set flags " $flags"
set -l flag_bg $lt_green
set -l flag_bg $
__bobthefish_
lt_green
set -l flag_fg $dk_green
set -l flag_fg $
__bobthefish_
dk_green
if test "$dirty" -o "$staged"
if test "$dirty" -o "$staged"
set flag_bg $med_red
set flag_bg $
__bobthefish_
med_red
set flag_fg fff
set flag_fg fff
else
else
if test "$stashed"
if test "$stashed"
set flag_bg $lt_orange
set flag_bg $
__bobthefish_
lt_orange
set flag_fg $dk_orange
set flag_fg $
__bobthefish_
dk_orange
end
end
end
end
...
@@ -236,7 +236,7 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
...
@@ -236,7 +236,7 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
if test -w "$PWD"
if test -w "$PWD"
__bobthefish_start_segment 333 999
__bobthefish_start_segment 333 999
else
else
__bobthefish_start_segment $
med_red $
lt_red
__bobthefish_start_segment $
__bobthefish_med_red $__bobthefish_
lt_red
end
end
echo -n -s $project_pwd ' '
echo -n -s $project_pwd ' '
...
...
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