aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-15 00:05:58 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-15 00:05:58 +1200
commit582fd3b69868f12fc14f0fbefb81521445b075fa (patch)
tree4ef35adb0287df3e7fd38d0976ae172b2c60d914 /bash/bashrc.d/prompt.bash
parentRemove -d option from edda(1) mktemp(1) call (diff)
downloaddotfiles-582fd3b69868f12fc14f0fbefb81521445b075fa.tar.gz
dotfiles-582fd3b69868f12fc14f0fbefb81521445b075fa.zip
Terser `read -rd ''` idiom
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 6d90547f..75bb197c 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -115,7 +115,7 @@ prompt() {
# Safely read status with -z --porcelain
local line
local -i ready modified untracked
- while IFS= read -d '' -r line ; do
+ while IFS= read -rd '' line ; do
if [[ $line == [MADRCT]* ]] ; then
ready=1
fi
@@ -164,7 +164,7 @@ prompt() {
# Safely read status with -0
local line
local -i modified untracked
- while IFS= read -d '' -r line ; do
+ while IFS= read -rd '' line ; do
if [[ $line == '?'* ]] ; then
untracked=1
else