From 2e061da9cf95cf3db2af05602db45da416a45d63 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 26 Jul 2014 16:59:58 -0700 Subject: [PATCH] Created SC1001 (markdown) --- SC1001.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 SC1001.md diff --git a/SC1001.md b/SC1001.md new file mode 100644 index 0000000..27e9789 --- /dev/null +++ b/SC1001.md @@ -0,0 +1,29 @@ +## This \c will be a regular 'c' in this context. + +### Problematic code: + + echo Yay \o/ + +or + + \git status + +### Correct code: + + echo 'Yay \o/' + +or + + command git status + +### Rationale: + +Escaping something that doesn't need escaping sometimes indicates a bug. + +If the backslash was supposed to be literal, single quote it. + +If the purpose is to run an external command rather than an alias, prefer `command`. + +### Contraindications + +If you have an alias and a function (as opposed to an external command), you can either ignore this message or use `"name"` instead of `\name` to quiet ShellCheck. \ No newline at end of file