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
0a391106
Commit
0a391106
authored
Jan 29, 2015
by
Aaron Hamilton
Committed by
Bruno Pinto
Jan 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nai theme.
parent
82104351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
themes/nai/README.md
themes/nai/README.md
+10
-0
themes/nai/fish_prompt.fish
themes/nai/fish_prompt.fish
+38
-0
No files found.
themes/nai/README.md
0 → 100644
View file @
0a391106
## nai
A minimalist fish theme which displays git branch and status information.
#### Characteristics
##### Left Prompt
*
Truncated CWD (just the current folder name)
*
Git branch and dirty state (if applicable)
\ No newline at end of file
themes/nai/fish_prompt.fish
0 → 100644
View file @
0a391106
# name: nai
# Display the following bits on the left:
# * 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_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l yellow (set_color yellow)
set -l green (set_color green)
set -l normal (set_color normal)
set -l cwd (basename (prompt_pwd))
echo -e ""
echo -n -s ' ' $cwd $normal
if [ (_git_branch_name) ]
set -l git_branch (_git_branch_name)
if [ (_git_dirty) ]
set git_info $yellow $git_branch
else
set git_info $green $git_branch
end
echo -n -s ' ' $git_info $normal
end
echo -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