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
ba18a3ea
Commit
ba18a3ea
authored
Jan 14, 2014
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #110 from cseelus/clearance
parents
f7e4df1e
26abd15e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
0 deletions
+63
-0
themes/clearance/README.md
themes/clearance/README.md
+9
-0
themes/clearance/clearance-fish_preview.png
themes/clearance/clearance-fish_preview.png
+0
-0
themes/clearance/fish_prompt.fish
themes/clearance/fish_prompt.fish
+54
-0
No files found.
themes/clearance/README.md
0 → 100644
View file @
ba18a3ea
# Fish Theme: clearance
A minimalist
[
fish shell
](
http://fishshell.com/
)
theme for people who use git

## Like it?
Check out other versions of this theme for OSX Terminal or VIM!
themes/clearance/clearance-fish_preview.png
0 → 100644
View file @
ba18a3ea
232 KB
themes/clearance/fish_prompt.fish
0 → 100644
View file @
ba18a3ea
# name: clearance
# ---------------
# Based on idan. Display the following bits on the left:
# - Virtualenv name (if applicable, see https://github.com/adambrenecki/virtualfish)
# - Current directory name
# - Git branch and dirty state (if inside a git repo)
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_is_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color cyan)
set -l yellow (set_color yellow)
set -l red (set_color red)
set -l blue (set_color blue)
set -l green (set_color green)
set -l normal (set_color normal)
set -l cwd $blue(pwd | sed "s:^$HOME:~:")
# Output the prompt, left to right
# Add a newline before new prompts
echo -e ''
# Display [venvname] if in a virtualenv
if set -q VIRTUAL_ENV
echo -n -s (set_color -b cyan black) '[' (basename "$VIRTUAL_ENV") ']' $normal ' '
end
# Print pwd or full path
echo -n -s $cwd $normal
# Show git branch and status
if [ (_git_branch_name) ]
set -l git_branch (_git_branch_name)
if [ (_git_is_dirty) ]
set git_info '(' $yellow $git_branch "±" $normal ')'
else
set git_info '(' $green $git_branch $normal ')'
end
echo -n -s ' · ' $git_info $normal
end
# Terminate with a nice prompt char
echo -e ''
echo -e -n -s '⟩ ' $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