diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-06-03 14:13:51 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-06-05 00:14:44 +0200 |
commit | 7e6dee86f24c41338c9294dbd5f83ce8155b6d96 (patch) | |
tree | d591e483fd9746e97dd560f3cf2b3ecb76fa9bb7 /01_Functions.zsh | |
parent | d973614c6c9df79f21c74c1340229cb9b619ca34 (diff) |
[Funcs/git] shows added files in git branch
Diffstat (limited to '01_Functions.zsh')
-rw-r--r-- | 01_Functions.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index 35cc361..3b7a517 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -114,6 +114,11 @@ get_git_branch () fi fi + if [ "$(git-status 2>&- | grep "new file" | head -n1)" != "" ] ; then + # ADDED FILES + my_git_branch=$my_git_branch" (+)" + fi + echo $my_git_branch } @@ -136,7 +141,7 @@ get_git_status () if [ "$(git-diff --cached 2>&- | grep '^diff ' | head -n1 )" != "" ] ; then cached="yes" fi - if [ "$(git-ls-files -m 2>&-)" != "" ] ; then + if [ "$(git-ls-files -m 2>&- | head -n1)" != "" ] ; then not_up_to_date="yes" fi |