Browse Source

Add disable status in state

Leo 8 years ago
parent
commit
2be80fd086
1 changed files with 8 additions and 4 deletions
  1. 8 4
      src/state.ml

+ 8 - 4
src/state.ml

@@ -38,12 +38,11 @@ open Core.Std;;
 
 
 (* Module to display the current state of the program *)
 (* Module to display the current state of the program *)
 
 
-(* TODO Print whether auto-launch is set or not *)
 (* Display current state *)
 (* Display current state *)
 let print_current ~(rc:Rc.t) () =
 let print_current ~(rc:Rc.t) () =
-  let log =
+  let tmp, log =
     Tmp_file.init ()
     Tmp_file.init ()
-    |> (fun tmp -> Tmp_file.get_accurate_log ~tmp ())
+    |> (fun tmp -> (tmp, Tmp_file.get_accurate_log ~tmp ()))
   in
   in
   let next_command =
   let next_command =
     match
     match
@@ -56,5 +55,10 @@ let print_current ~(rc:Rc.t) () =
       |> fun entry -> sprintf "Next: command %i, '%s'" num entry#command
       |> fun entry -> sprintf "Next: command %i, '%s'" num entry#command
     | None -> "Nothing next"
     | None -> "Nothing next"
   in
   in
-  Messages.ok next_command
+  let is_disabled =
+    Tmp_file.is_disabled ~tmp
+    |> sprintf "Disabled: %b"
+  in
+  Messages.ok next_command;
+  Messages.ok is_disabled
 ;;
 ;;