Renaming variables

Ones that are all uppercase can conflict with system variables.  Using
lower case or camelCase variables will ensure we will never conflict
with these predefined values.
This commit is contained in:
Tyler Akins
2015-10-02 10:47:53 -05:00
parent 14b156d3c0
commit ddf6d79a14
2 changed files with 222 additions and 217 deletions

8
API.md
View File

@@ -94,8 +94,8 @@ Examples
callFunc () {
local "$1" && moIndirect "$1" "the value"
}
callFunc DEST
echo "$DEST" # writes "the value"
callFunc dest
echo "$dest" # writes "the value"
Returns nothing.
@@ -114,8 +114,8 @@ Examples
local myArray=(one two three)
local "$1" && moIndirectArray "$1" "${myArray[@]}"
}
callFunc DEST
echo "${DEST[@]}" # writes "one two three"
callFunc dest
echo "${dest[@]}" # writes "one two three"
Returns nothing.