Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate suggestions from #34 #63

Merged
merged 1 commit into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __parse_git_branch.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function __parse_git_branch -d "Parse current Git branch name"
command git symbolic-ref --short HEAD ^/dev/null;
or string split '\n' (command git show-ref --head -s --abbrev)[1]
or echo (command git show-ref --head -s --abbrev HEAD)[1]
end
2 changes: 1 addition & 1 deletion fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function pre_prompt --on-event fish_prompt
# Check if there is an upstream configured
command git rev-parse --abbrev-ref '@{upstream}' >/dev/null ^&1; and set -l has_upstream
if set -q has_upstream
set -l git_status (string split ' ' (string replace -ar '\s+' ' ' (command git rev-list --left-right --count 'HEAD...@{upstream}')))
command git rev-list --left-right --count 'HEAD...@{upstream}' | read -la git_status

set -l git_arrow_left $git_status[1]
set -l git_arrow_right $git_status[2]
Expand Down