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
7e6b6658
Commit
7e6b6658
authored
Jul 10, 2013
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #47 from playonverbs/master
Making `git` faster for `hub` users
parents
06572e0d
9767a6d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
20 deletions
+20
-20
themes/agnoster/fish_prompt.fish
themes/agnoster/fish_prompt.fish
+5
-5
themes/cor/fish_right_prompt.fish
themes/cor/fish_right_prompt.fish
+2
-2
themes/idan/fish_prompt.fish
themes/idan/fish_prompt.fish
+2
-2
themes/krisleech/fish_prompt.fish
themes/krisleech/fish_prompt.fish
+2
-2
themes/l/fish_prompt.fish
themes/l/fish_prompt.fish
+3
-3
themes/numist/fish_prompt.fish
themes/numist/fish_prompt.fish
+4
-4
themes/robbyrussell/fish_prompt.fish
themes/robbyrussell/fish_prompt.fish
+2
-2
No files found.
themes/agnoster/fish_prompt.fish
View file @
7e6b6658
...
...
@@ -26,7 +26,7 @@ set -g __fish_git_prompt_char_cleanstate ''
function parse_git_dirty
set -l submodule_syntax
set submodule_syntax "--ignore-submodules=dirty"
set git_dirty (git status -s $submodule_syntax 2> /dev/null)
set git_dirty (
command
git status -s $submodule_syntax 2> /dev/null)
if [ -n "$git_dirty" ]
if [ $__fish_git_prompt_showdirtystate = "yes" ]
echo -n "$__fish_git_prompt_char_dirtystate"
...
...
@@ -105,12 +105,12 @@ end
function prompt_git -d "Display the actual git state"
set -l ref
set -l dirty
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
if
command
git rev-parse --is-inside-work-tree >/dev/null 2>&1
set dirty (parse_git_dirty)
set ref (git symbolic-ref HEAD 2> /dev/null)
set ref (git symbolic-ref HEAD 2> /dev/null)
set ref (
command
git symbolic-ref HEAD 2> /dev/null)
set ref (
command
git symbolic-ref HEAD 2> /dev/null)
if [ $status -gt 0 ]
set -l branch (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 "➦ $branch "
end
set -l branch (echo $ref | sed 's-refs/heads/-⭠ -')
...
...
themes/cor/fish_right_prompt.fish
View file @
7e6b6658
# Display git branch and dirty bit and current time on the right
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
echo (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
echo (
command
git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_right_prompt
...
...
themes/idan/fish_prompt.fish
View file @
7e6b6658
...
...
@@ -4,11 +4,11 @@
# * Git branch and dirty state (if inside a git repo)
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
echo (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
echo (
command
git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
...
...
themes/krisleech/fish_prompt.fish
View file @
7e6b6658
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
echo (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
echo (
command
git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
...
...
themes/l/fish_prompt.fish
View file @
7e6b6658
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
echo (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
echo (
command
git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
...
...
@@ -25,4 +25,4 @@ function fish_prompt
end
echo -n -s $cwd $git_info $normal ' ' $arrow ' '
end
\ No newline at end of file
end
themes/numist/fish_prompt.fish
View file @
7e6b6658
...
...
@@ -50,17 +50,17 @@ function fish_prompt
# Git stuff
set -l git_info
if [ (git rev-parse --is-inside-work-tree ^/dev/null) ]
if [ (
command
git rev-parse --is-inside-work-tree ^/dev/null) ]
# Get the current branch name/commit
set -l git_branch_name (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
set -l git_branch_name (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
if [ -z $git_branch_name ]
set git_branch_name (git show-ref --head -s --abbrev | head -n1 2> /dev/null)
set git_branch_name (
command
git show-ref --head -s --abbrev | head -n1 2> /dev/null)
end
# Unconditional git component
set git_info "$normal""on $white$git_branch_name"
if [ (git status -s --ignore-submodules=dirty | wc -l) -gt 0 ]
if [ (
command
git status -s --ignore-submodules=dirty | wc -l) -gt 0 ]
set git_info "$git_info$yellow*"
end
...
...
themes/robbyrussell/fish_prompt.fish
View file @
7e6b6658
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
echo (
command
git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
echo (
command
git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
...
...
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