Added a few new functions for dumping config state, also added new facilities for specifying that certain config options should be an array or a hash

This commit is contained in:
2013-10-09 13:27:05 -04:00
parent 1486f32e73
commit 308e38279f
2 changed files with 179 additions and 22 deletions

15
test.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/bash4
declare -a cmdarg_array
declare -A cmdarg_hash
source ./cmdarg.sh
cmdarg 'b' 'boolean' 'A boolean argument'
cmdarg 's:' 'string' 'A string argument'
cmdarg 'a:[]' 'array' 'An array argument'
cmdarg 'H:{}' 'hash' 'A hash argument'
cmdarg_parse "$@"
cmdarg_dump