diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 20:22:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 20:36:45 +1200 |
commit | 443643200d728b4947349b13e2345ec9ae82d203 (patch) | |
tree | 5a8d13f6a39505608ac42d182c864703ca6bc649 | |
parent | Ignore SC1090 (allow unfollowable dotting) (diff) | |
download | dotfiles-443643200d728b4947349b13e2345ec9ae82d203.tar.gz dotfiles-443643200d728b4947349b13e2345ec9ae82d203.zip |
Add -r to read to placate shellcheck
-rw-r--r-- | bash/bash_completion.d/bd.bash | 2 | ||||
-rw-r--r-- | bash/bash_completion.d/make.bash | 2 | ||||
-rw-r--r-- | bash/bash_completion.d/path.bash | 2 | ||||
-rw-r--r-- | bash/bashrc.d/prompt.bash | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/bash/bash_completion.d/bd.bash b/bash/bash_completion.d/bd.bash index 7f4ae107..4b3d4a94 100644 --- a/bash/bash_completion.d/bd.bash +++ b/bash/bash_completion.d/bd.bash @@ -6,7 +6,7 @@ _bd() { # Build a list of dirnames in $PWD local -a dirnames - IFS=/ read -d '' -a dirnames < <(printf '%s\0' "${PWD#/}") + IFS=/ read -rd '' -a dirnames < <(printf '%s\0' "${PWD#/}") # Remove the last element in the array (the current directory) ((${#dirnames[@]})) || return 1 diff --git a/bash/bash_completion.d/make.bash b/bash/bash_completion.d/make.bash index ca209e8e..bf4ed268 100644 --- a/bash/bash_completion.d/make.bash +++ b/bash/bash_completion.d/make.bash @@ -15,7 +15,7 @@ _make() { # Break the target up with space delimiters local -a targets - IFS=' ' read -a targets -d '' < \ + IFS=' ' read -rd '' -a targets < \ <(printf '%s\0' "${line%%:*}") # Iterate through the targets and add suitable ones diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash index b8bdc6aa..60b36844 100644 --- a/bash/bash_completion.d/path.bash +++ b/bash/bash_completion.d/path.bash @@ -41,7 +41,7 @@ _path() { # Complete with directories from PATH remove) local -a promptarr - IFS=: read -d '' -a promptarr < <(printf '%s\0' "$PATH") + IFS=: read -rd '' -a promptarr < <(printf '%s\0' "$PATH") local part for part in "${promptarr[@]}" ; do [[ $part == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 69801b90..ff8e4727 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -213,7 +213,7 @@ prompt() { # Show the count of background jobs in curly brackets, if not zero job) local -i jobc - while read ; do + while read -r ; do ((jobc++)) done < <(jobs -p) ((jobc)) && printf '{%u}' "$jobc" |