It is possible to declare a variable but not assign a value to it using
`export x`. When you do this, `declare -p x` shows the variable but does
not show an "=" nor any value afterwards.
When running another command, this variable will not be added to the
environment variables even though it is flagged as exported. Most likely
it's because the value is not a string and can't be easily converted to
a string; this is the same behavior as arrays.
Using `[[ -v x ]]` is also inadequate and I believe its because there
are false positives when trying to access data, which goes on to break
tests and the new braces and parenthesis indirection. Perhaps it could
be reviewed and made to work.
The best solution so far is to combine `declare -p` with `[[ -v` to see
if the variable is declared and if a value is set.
Closes#75.
Old way:
functionName CONTENT argument1 argument2
New way:
echo -n "$CONTENT" | functionName argument1 argument2
This follow the Unix style more closely.
When testing #19 I found that the tests were mistakenly ignoring some
whitespace changes. I've enabled whitespace checks and had to update the
tests because my editor likes newlines at the end of files and removes
whitespace at the end of lines. To make the test files easier to manage,
I've modified some scenarios to still test for the feature but also work
with the whitespace modifications that editors would perform.
This is based off of pull request #10 from @athieriot.
Thanks for the idea! I've implemented it as a flag and an environment
variable that can be enabled. I've also added another test to handle
the environment variable.
Add a demo/sourcing.vars file to be used by the associated demo
script.
Modified mo argument parsing so that --help and --source=file do not need
to be the first arguments for mo. And can in fact appear after or in the
middle of filenames.
This used to make a name like DATA.0.STR. Since bash doesn't like using
multi-dimensional arrays, we can shortcut things and just assume that
STR referes to the global variable here.
This closes issue #7
Pulled the block finding code into its own function to eliminate a
recursion problem.
Test failure count dropped because lambdas are supported and I just
needed to update the spec. Pull request mustache/spec#86 aims to add
bash support. Until then, the testing script will fall back to using
perl.
34 failing tests