From 5dfb1cd96a65c425f273be43d97f8366d5fb017f Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Tue, 5 May 2015 10:46:06 -0500 Subject: [PATCH] Better associative array handling Bug: Did not properly detect the length of an array in mustache-test because I neglected to use `[@]` after the array name. This closes issue #6. Feature: Made {{ARRAY_NAME}} implode array values with commas. Feature: Added an associative array demo script. --- demo/associative-arrays | 16 ++++++++++++++++ mo | 36 +++++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100755 demo/associative-arrays diff --git a/demo/associative-arrays b/demo/associative-arrays new file mode 100755 index 0000000..b8bb864 --- /dev/null +++ b/demo/associative-arrays @@ -0,0 +1,16 @@ +#!/bin/bash + +declare -A DATA +DATA=([one]=111 [two]=222) + +cat <