diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 13:48:33 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 13:48:33 +0100 |
commit | 178ffef0226b45ad4b1862c7e9223cd539788bcc (patch) | |
tree | 765e23862f50479dd48ab312f6cb9aa0fa202a86 /bash/git.bash | |
parent | 724bb024d49f2883c186e80a016abd9b956bba96 (diff) | |
download | dotfiles-178ffef0226b45ad4b1862c7e9223cd539788bcc.tar.gz |
removed bashit
Diffstat (limited to 'bash/git.bash')
-rw-r--r-- | bash/git.bash | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bash/git.bash b/bash/git.bash new file mode 100644 index 0000000..365eac2 --- /dev/null +++ b/bash/git.bash @@ -0,0 +1,8 @@ +# vi:syntax=sh + +function get_git_state () { + local GIT_STATUS=$(git status -bs) + local GIT_BRANCH=$(echo $GIT_STATUS | grep "^## :") + local GIT_CHANGED=$(echo $GIT_STATUS | grep -c "^ M") + local GIT_UNTRACKED=$(echo $GIT_STATUS | grep -c "^??") +} |