mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Stringify __fish_git_prompt
This commit is contained in:
parent
26e781ef5a
commit
aed5267fd1
1 changed files with 4 additions and 4 deletions
|
@ -472,11 +472,11 @@ set -g ___fish_git_prompt_status_order stagedstate invalidstate dirtystate untra
|
|||
|
||||
function __fish_git_prompt_informative_status
|
||||
|
||||
set -l changedFiles (command git diff --name-status | cut -c 1-2)
|
||||
set -l stagedFiles (command git diff --staged --name-status | cut -c 1-2)
|
||||
set -l changedFiles (command git diff --name-status | string match -r \\w)
|
||||
set -l stagedFiles (command git diff --staged --name-status | string match -r \\w)
|
||||
|
||||
set -l dirtystate (math (count $changedFiles) - (count (echo $changedFiles | grep "U")) ^/dev/null)
|
||||
set -l invalidstate (count (echo $stagedFiles | grep "U"))
|
||||
set -l dirtystate (math (count $changedFiles) - (count (echo $changedFiles | string match -r "U")) ^/dev/null)
|
||||
set -l invalidstate (count (echo $stagedFiles | string match -r "U"))
|
||||
set -l stagedstate (math (count $stagedFiles) - $invalidstate ^/dev/null)
|
||||
set -l untrackedfiles (command git ls-files --others --exclude-standard | wc -l | string trim)
|
||||
|
||||
|
|
Loading…
Reference in a new issue