aboutsummaryrefslogtreecommitdiffstats
path: root/config/examples.sh.sample
diff options
context:
space:
mode:
authorJames Pannacciulli <jpnc@jpnc.info>2017-06-12 11:21:21 -0700
committerJames Pannacciulli <jpnc@jpnc.info>2017-06-12 11:21:21 -0700
commit1b09c0814cd1e5d5a57be0c45c879fe0b146d220 (patch)
tree08675c158599f6feff08a6c4d244b729c5e5c1bb /config/examples.sh.sample
parent479f4a166b5d81ce6b363cce13c9763f09c74211 (diff)
downloadariketa-1b09c0814cd1e5d5a57be0c45c879fe0b146d220.tar.gz
ariketa-1b09c0814cd1e5d5a57be0c45c879fe0b146d220.tar.bz2
move sample examples out of config, show USAGE if no examples
Diffstat (limited to 'config/examples.sh.sample')
-rw-r--r--config/examples.sh.sample25
1 files changed, 25 insertions, 0 deletions
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'*/}") )'
+
+)