feature #3826: listconfig configurable with env

Env variable ONE_LISTCONF, can be overridden with --listconf
This commit is contained in:
Javi Fontan committed 2015-06-05 18:04:25 -04:00
1 parent c0ae441f10
commit ffae98ac0a
1 file changed
+7 -2
+7 -2
View File
@@ -329,10 +329,15 @@ module CLIHelper
default = config.delete(:default)
default_conf = config.delete(:default_conf) || {}
listconf = options[:listconf]
listconf = default_conf[options[:listconf].to_sym]
listconf = default_conf[listconf.to_sym] if listconf
if options[:listconf] && listconf
if !listconf && ENV['ONE_LISTCONF']
listconf = default_conf[ENV['ONE_LISTCONF'].to_sym]
end
if listconf
@default_columns = listconf
else
@default_columns = default unless default.empty?