diff --git a/SC2290.md b/SC2290.md new file mode 100644 index 0000000..37881df --- /dev/null +++ b/SC2290.md @@ -0,0 +1,31 @@ +## Remove spaces around = to assign. + +### Problematic code: + +```sh +export LC_ALL = "POSIX" +``` + +### Correct code: + +```sh +export LC_ALL="POSIX" +``` + +### Rationale: + +Parameters to `export`, `declare`, `local`, `typeset` and `readonly` may not have spaces around the `=` or `+=` operator. This is the same as for regular variable assignments: + + export var = value # Invalid: spaces around = + export var =value # Invalid: space before = + export var= value # Invalid: space after = + export var=value # Valid + + +### Exceptions: + +None + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file