Skip to content

Commit

Permalink
Fix cmdliner man (#429) (#431)
Browse files Browse the repository at this point in the history
* Fix error in parse_command for profiling option documentation

* Use with-stdout-to instead of with-outputs-to in dune command for manpage generation

* Fix Gui configuration file initialisation
  • Loading branch information
ACoquereau authored Jan 27, 2021
1 parent 3a72681 commit 0da3b24
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/bin/common/parse_command.ml
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,8 @@ let parse_profiling_opt =
let profiling =
let doc =
"Activate the profiling module with the given frequency. \
Use Ctrl-C to switch between different views and \\\"Ctrl \
+ AltGr + \" to exit." in
Use Ctrl-C to switch between different views and \"Ctrl \
+ AltGr + \\\\ \" to exit." in
let docv = "DELAY" in
Arg.(value & opt (some float) None & info ["profiling"] ~docv ~docs ~doc) in

Expand Down
2 changes: 1 addition & 1 deletion src/bin/gui/dune
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
; Rule to generate a man page for altgr-ergo
(rule
(target altgr-ergo.1)
(action (with-outputs-to %{target} (run altgr-ergo --help=groff)))
(action (with-stdout-to %{target} (run altgr-ergo --help=groff)))
)

; Install the man page
Expand Down
3 changes: 0 additions & 3 deletions src/bin/gui/gui_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ let init () =
load ();
with Sys_error _ -> write ()


let () = init ()

let window_width = !window_width
let window_height = !window_height
let indent_size = !indent_size
Expand Down
4 changes: 4 additions & 0 deletions src/bin/gui/gui_config.mli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ val load : unit -> unit
(** Write the configuration file to the default location *)
val write : unit -> unit

(** Try to load the configuration file from the default location,
if not present try to write it to the default location *)
val init : unit -> unit

(** Update the size of the window *)
val update_window_size : int -> int -> unit

Expand Down
1 change: 1 addition & 0 deletions src/bin/gui/main_gui.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@ let start_replay session_cin all_used_context =


let () =
Gui_config.init ();
init_gtk ();
Signals.init_sig_int ();
Signals.init_sig_alarm ();
Expand Down
2 changes: 1 addition & 1 deletion src/bin/text/dune
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
; Rule to generate a man page for alt-ergo
(rule
(target alt-ergo.1)
(action (with-outputs-to %{target} (run alt-ergo --help=groff)))
(action (with-stdout-to %{target} (run alt-ergo --help=groff)))
)

; Install the man page
Expand Down

0 comments on commit 0da3b24

Please sign in to comment.