Commit
Author: Kevin Schoon [kevinschoon@gmail.com]
Hash: f5be3340149c8f39110b3d0160c49896b5f1f10b
Timestamp: Sat, 26 Sep 2020 23:58:26 +0000 (4 years ago)

+2 -2 +/-2 browse
output config as yaml
1diff --git a/lib/cmd.ml b/lib/cmd.ml
2index 3818bdd..c2828de 100644
3--- a/lib/cmd.ml
4+++ b/lib/cmd.ml
5 @@ -94,7 +94,7 @@ note config -get state_dir
6 | Some key ->
7 let value = get load key in
8 print_endline (value_as_string value)
9- | None -> print_endline (to_string load)]
10+ | None -> print_string (to_string load)]
11
12 let create_note =
13 let open Command.Let_syntax in
14 diff --git a/lib/config.ml b/lib/config.ml
15index ea3e5d7..7b0f7ca 100644
16--- a/lib/config.ml
17+++ b/lib/config.ml
18 @@ -86,7 +86,7 @@ let of_json key json =
19 | Key.Encoding ->
20 Encoding (Some (Encoding.of_string (Ezjsonm.get_string json)))
21
22- let to_string t = Ezjsonm.to_string (Ezjsonm.wrap t)
23+ let to_string t = Yaml.to_string_exn t
24
25 let get t key =
26 match Ezjsonm.find_opt t [ Key.to_string key ] with