diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-11-01 01:44:26 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-11-01 01:44:26 +1300 |
commit | 1047622ed0979401b9a84a6cd2a708d0eba5dd6c (patch) | |
tree | 3f708a4daf609d474b41c0b2aa36ecbe861992bb /bash/bashrc.d/prompt.bash | |
parent | Add a couple of file detection rules (diff) | |
download | dotfiles-1047622ed0979401b9a84a6cd2a708d0eba5dd6c.tar.gz dotfiles-1047622ed0979401b9a84a6cd2a708d0eba5dd6c.zip |
Better read d-null syntax
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 2cf8055a..9aae086d 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -87,7 +87,7 @@ prompt() { # Safely read status with -z --porcelain local line local -i ready=0 modified=0 untracked=0 - while IFS= read -d $'\0' -r line ; do + while IFS= read -r -d '' line ; do if [[ $line == [MADRCT]* ]] ; then ready=1 fi @@ -140,7 +140,7 @@ prompt() { # Safely read status with -0 local line local -i modified=0 untracked=0 - while IFS= read -d $'\0' -r line ; do + while IFS= read -r -d '' line ; do if [[ $line == '?'* ]] ; then untracked=1 else |