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
506ef66e
Commit
506ef66e
authored
Apr 24, 2015
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #436 from bobthecow/bobthefish-git-untracked-override
[bobthefish] allow git untracked files override
parents
82bc5e68
027be0a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
themes/bobthefish/fish_prompt.fish
themes/bobthefish/fish_prompt.fish
+7
-2
No files found.
themes/bobthefish/fish_prompt.fish
View file @
506ef66e
...
...
@@ -13,6 +13,7 @@
# You can override some default options in your config.fish:
#
# set -g theme_display_git no
# set -g theme_display_git_untracked no
# set -g theme_display_hg yes
# set -g theme_display_virtualenv no
# set -g theme_display_ruby no
...
...
@@ -286,8 +287,12 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
set -l stashed (command git rev-parse --verify --quiet refs/stash >/dev/null; and echo -n '$')
set -l ahead (command git rev-list --left-right '@{upstream}...HEAD' ^/dev/null | awk '/>/ {a += 1} /</ {b += 1} {if (a > 0) nextfile} END {if (a > 0 && b > 0) print "±"; else if (a > 0) print "+"; else if (b > 0) print "-"}')
set -l new (command git ls-files --other --exclude-standard);
[ "$new" ]; and set new '…'
set -l new ''
set -l show_untracked (git config --bool bash.showUntrackedFiles)
if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ]
set new (command git ls-files --other --exclude-standard)
[ "$new" ]; and set new '…'
end
set -l flags "$dirty$staged$stashed$ahead$new"
[ "$flags" ]; and set flags " $flags"
...
...
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