1
0
mirror of https://github.com/mbollmann/fishpkgs.git synced 2024-10-27 20:34:02 +00:00
mbollmann_fishpkgs/functions/git_untracked_files.fish

16 lines
307 B
Fish
Raw Normal View History

function git_untracked_files -d "Get the number of untracked files in a repository"
git_is_repo; and command git ls-files --others --exclude-standard | command awk '
BEGIN {
n = 0
}
{ n++ }
END {
print n
exit !n
}
'
end