File tree Expand file tree Collapse file tree 5 files changed +15
-1
lines changed Expand file tree Collapse file tree 5 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ ; comments are allowed
12hello = world
23bashly = works
34
Original file line number Diff line number Diff line change @@ -325,6 +325,11 @@ configly_list_command() {
325325 # :src/list_command.sh
326326 # Using the standard library (lib/config.sh) to show the entire config file
327327 config_show
328+
329+ # Or to iterate through keys
330+ for key in $( config_keys) ; do
331+ echo " $key === $( config_get " $key " ) "
332+ done
328333}
329334
330335# :command.parse_requirements
Original file line number Diff line number Diff line change 11# Using the standard library (lib/config.sh) to show the entire config file
22config_show
3+
4+ # Or to iterate through keys
5+ for key in $( config_keys) ; do
6+ echo " $key === $( config_get " $key " ) "
7+ done
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ config_show() {
100100# done
101101#
102102config_keys () {
103- regex=" ^(.* )\s*="
103+ regex=" ^([a-zA-Z0-9_\-]+ )\s*="
104104
105105 config_init
106106
Original file line number Diff line number Diff line change 3535+ ./configly get invalid_key
3636No such key: invalid_key
3737+ ./configly list
38+ ; comments are allowed
3839hello = world
3940bashly = works
4041
42+ hello === world
43+ bashly === works
You can’t perform that action at this time.
0 commit comments