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