OCaml: Add noninteractive configuration key
This commit is contained in:
parent
c6c92c0a32
commit
1f16024c9e
4 changed files with 28 additions and 4 deletions
|
|
@ -30,6 +30,7 @@ let string_of_token (token: token): string =
|
|||
| Key k -> (match k with
|
||||
| SuCommand -> "[ KEY: su_command ]"
|
||||
| SuCommandQuoted -> "[ KEY: su_command_quoted ]"
|
||||
| Interactive -> " [ KEY: interactive ]"
|
||||
| Unknown -> "[ UNKNOWN KEY ]")
|
||||
| Equal -> "[ OP: equal ]"
|
||||
| Value v -> "[ VAL: " ^ v ^ " ]"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ let update config key (value: string): Schema.main =
|
|||
| SuCommandQuoted ->
|
||||
{ config with
|
||||
Schema.su_command_quoted = parse_boolean key value }
|
||||
| Interactive ->
|
||||
{ config with
|
||||
Schema.interactive = bool_of_string value }
|
||||
| Unknown ->
|
||||
elog ~context:Parsing $ "[c.parser.update] Dropped value: unknown key";
|
||||
config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue