aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/examples.sh22
-rw-r--r--config/examples.sh.sample25
2 files changed, 30 insertions, 17 deletions
diff --git a/config/examples.sh b/config/examples.sh
index 41d5c0c..acb0885 100644
--- a/config/examples.sh
+++ b/config/examples.sh
@@ -1,20 +1,8 @@
-_examples=(
-
-'example tag:
-echo "example command"'
-
-'example tag:
-printf "%s\n" "this is a second example tag example"'
+#!/bin/bash
-'example tag:
-printf "%s\n" good for measure another | sort'
-
-'a different tag:
-echo "did you notice the tag above along with its adjacency indicators (+) ?"'
-
-'a different tag:
-uniq \
- <(sort \
- <(printf "%s\n" "${_examples[@]//:$'\n'*/}") )'
+# each array element will be an example code snippet
+# code must be preceded by a tag, followed by a ':' and a newline
+_examples=(
+ # place quoted examples here
)
diff --git a/config/examples.sh.sample b/config/examples.sh.sample
new file mode 100644
index 0000000..fffb4d4
--- /dev/null
+++ b/config/examples.sh.sample
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# each array element will be an example code snippet
+# code must be preceded by a tag, followed by a ':' and a newline
+
+_examples=(
+
+'example tag:
+echo "example command"'
+
+'example tag:
+printf "%s\n" "this is a second example tag example"'
+
+'example tag:
+printf "%s\n" good for measure another | sort'
+
+'a different tag:
+echo "did you notice the tag above along with its adjacency indicators (+) ?"'
+
+'a different tag:
+uniq \
+ <(sort \
+ <(printf "%s\n" "${_examples[@]//:$'\n'*/}") )'
+
+)