Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve shellcheck SC2162: read without -r will mangle backslashes #56

Merged
merged 1 commit into from
Jun 22, 2017
Merged

resolve shellcheck SC2162: read without -r will mangle backslashes #56

merged 1 commit into from
Jun 22, 2017

Conversation

mobilemind
Copy link
Contributor

Though it seems unlikely something like "hostname" would have backslash-escaped characters, shellcheck warns that rmate uses "read without -r" in 3 places. This PR includes the recommended change in all 4 places.

Note that $ help read indicates:

If the -r option is given, this signifies `raw' input, and
backslash escaping is disabled.

The read -r option might not be what rmate needs, in any (or all) cases.

The snippet below shows the issues as reported by shellcheck v 0.4.6.

shellcheck rmate | grep -F -B 4 'SC2162'

In rmate line 70:
        while read row; do
              ^-- SC2162: read without -r will mangle backslashes.
--
In rmate line 316:
    while read 0<&3; do
          ^-- SC2162: read without -r will mangle backslashes.
--
In rmate line 325:
        while read 0<&3; do
              ^-- SC2162: read without -r will mangle backslashes.
--
In rmate line 382:
read server_info 0<&3
^-- SC2162: read without -r will mangle backslashes.

@aurora aurora merged commit 72a9f5a into aurora:master Jun 22, 2017
@aurora
Copy link
Owner

aurora commented Jun 22, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants