Browse Source

Amend comment

Leo 10 years ago
parent
commit
3c9360e605
2 changed files with 7 additions and 1 deletions
  1. 1 1
      src/command_def.ml
  2. 6 0
      src/const.ml

+ 1 - 1
src/command_def.ml

@@ -59,7 +59,7 @@ let args =
     +> flag "-a" no_arg
     ~aliases:["-add" ; "--add"]
     ~doc:"[n] Add the command given on stdin to configuration file at a given position. If nothing is given, append it."
-    (* Flag to add a command to rc file, from stdin or directly *)
+    (* Flag to remove a command from rc file *)
     +> flag "-d" no_arg
     ~aliases:["-delete" ; "--delete"]
     ~doc:"[n] remove the nth command from configuration file. If n is absent, remove last one"

+ 6 - 0
src/const.ml

@@ -44,6 +44,12 @@ let home = match (Sys.getenv "HOME") with
   | None -> failwith "Wrong value for home\n"
 ;;
 
+(* Get default editor *)
+let editor = match (Sys.getenv "EDITOR") with
+  | Some x -> x
+  | None -> failwith "Wrong value for $EDITOR\n"
+;;
+
 (* Default place to read settings *)
 let rc_file_default = home ^ "/" ^ ".oclaunch_rc.json";;
 (* Current place to read settings, maybe modified from command line argument *)