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
17a807f5
You need to sign in or sign up before continuing.
Commit
17a807f5
authored
May 01, 2015
by
Pablo Santiago Blum de Aguiar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
themes: add a new theme, scorphish
parent
568c601c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
0 deletions
+139
-0
themes/scorphish/README.md
themes/scorphish/README.md
+16
-0
themes/scorphish/fish_greeting.fish
themes/scorphish/fish_greeting.fish
+6
-0
themes/scorphish/fish_prompt.fish
themes/scorphish/fish_prompt.fish
+99
-0
themes/scorphish/fish_right_prompt.fish
themes/scorphish/fish_right_prompt.fish
+14
-0
themes/scorphish/fish_title.fish
themes/scorphish/fish_title.fish
+4
-0
No files found.
themes/scorphish/README.md
0 → 100644
View file @
17a807f5
## Scorphish
Compact. Sufficient.

#### Left prompt
Abbreviated path, ruby version, virtualenv and git info
#### Right prompt
Last command's exit code and current time
#### Acknowledgments
This theme is based on Zish and Coffeandcode themes, many thanks to their authors!
Enjoy!
themes/scorphish/fish_greeting.fish
0 → 100644
View file @
17a807f5
function fish_greeting -d "what's up, fish?"
set_color $fish_color_autosuggestion[1]
uname -npsr
uptime
set_color normal
end
themes/scorphish/fish_prompt.fish
0 → 100644
View file @
17a807f5
# name: scorphish
function _prompt_rubies -d 'Display current Ruby (rvm/rbenv)'
[ "$theme_display_ruby" = 'no' ]; and return
set -l ruby_version
if type rvm-prompt >/dev/null 2>&1
set ruby_version (rvm-prompt i v g)
else if type rbenv >/dev/null 2>&1
set ruby_version (rbenv version-name)
# Don't show global ruby version...
[ "$ruby_version" = (rbenv global) ]; and echo -n -s '--'; and return
end
[ -z "$ruby_version" ]; and return
echo -n -s $ruby_version
end
function _prompt_virtualfish -d "Display activated virtual environment (only for virtualfish, virtualenv's activate.fish changes prompt by itself)"
[ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ]; and echo -n -s '--'; and return
echo -n -s (basename "$VIRTUAL_ENV")
end
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function _git_dirty_remotes
set current_branch (git rev-parse --abbrev-ref HEAD)
set current_ref (git rev-parse HEAD)
for remote in (git remote)
# if test $remote != 'origin'
set remote_ref_branch "refs/remotes/$remote/$current_branch"
set remote_ref (git for-each-ref --format='%(objectname)' $remote_ref_branch)
if test "$remote_ref" != ''
if test "$remote_ref" != $current_ref
echo !
end
end
# end
end
end
function fish_prompt
set_color -o 666
printf '['
set_color -o blue
printf '%s' (prompt_pwd)
set_color -o 666
printf '|'
set_color -o red
_prompt_rubies
set_color -o 666
printf '|'
set_color -o green
_prompt_virtualfish
set_color -o 666
echo ']'
set -l gray (set_color 666)
set -l cyan (set_color cyan)
set -l red (set_color red)
set -l normal (set_color normal)
set -l yellow (set_color ffcc00)
set -l green (set_color 80ff00)
set -l pink (set_color ff99ff)
set -l dark_pink (set_color cc99ff)
# Show git branch and dirty state
if [ (_git_branch_name) ]
set -l git_branch (_git_branch_name)
set dirty_remotes (_git_dirty_remotes)
if [ (_is_git_dirty) ]
echo -n -s $gray '‹' $yellow $git_branch $red '*' $dirty_remotes $gray '›' $normal
else
echo -n -s $gray '‹' $yellow $git_branch $red $dirty_remotes $gray '›' $normal
end
end
set_color 060
printf ' »'
set_color 090
printf '»'
set_color 0c0
printf '»'
set_color 0f0
printf '» '
set_color normal
end
themes/scorphish/fish_right_prompt.fish
0 → 100644
View file @
17a807f5
function fish_right_prompt
set -l exit_code $status
if test $exit_code -ne 0
set_color red
else
set_color green
end
printf '%d' $exit_code
set_color -o 666
echo '|'
set_color -o 777
printf '%s' (date +%H:%M:%S)
set_color normal
end
\ No newline at end of file
themes/scorphish/fish_title.fish
0 → 100644
View file @
17a807f5
function fish_title
[ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ]; and printf '%s %s' $_ (pwd); and return
printf '%s %s' (basename "$VIRTUAL_ENV") (pwd)
end
\ 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