Browse Source

Improve help screen

 - Add synonym
 - Fix typo
 - Test editing. See #8.

   With multiple lines in edited file, it is just added in order. When editing
   out of bound, it is added at the end. No problem when mixing the two.

 -> Fix #8
Leo 10 years ago
parent
commit
75ddb7ad9a
2 changed files with 7 additions and 5 deletions
  1. 2 0
      CHANGELOG.md
  2. 5 5
      src/command_def.ml

+ 2 - 0
CHANGELOG.md

@@ -3,6 +3,7 @@
 ## 0.2.x
 
 ### v0.2.2
+ + Clean help
  + Use lazyness to speed up and lead to less error
  + Locking tmp file to prevent launching two times the same item (**not tested
    enough**)
@@ -10,6 +11,7 @@
  + Add options:
     + “-v” to set verbosity.
     + “--no-color” to toggle color off
+    + “--edit” is synonym of “--modify” now
  + Correct bugs:
    + When executing ```oclaunc -r``` more than once, it tries to delete an
      unexisting file and this led to errors.

+ 5 - 5
src/command_def.ml

@@ -50,7 +50,7 @@ let args =
     (* Flag to set colors *)
     +> flag "--no-color" no_arg
         ~aliases:["-no-color"]
-        ~doc:"Use this flag to disable color usage."
+        ~doc:" Use this flag to disable color usage."
     (* Flag to use different rc file *)
     +> flag "-c" (optional_with_default (Lazy.force !Const.rc_file) file)
     ~aliases:["--rc" ; "-rc"]
@@ -71,15 +71,15 @@ let args =
     (* 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"
+    ~doc:"[n] remove the nth command from configuration file. If n is absent, remove last one."
     (* Flag to display current number *)
     +> flag "-n" no_arg
     ~aliases:["-number" ; "--number"]
-    ~doc:" Display current state of the program"
+    ~doc:" Display current state of the program."
     (* Flag to edit the nth command *)
     +> flag "-m" no_arg
-    ~aliases:["-modify" ; "--modify"]
-    ~doc:"[n] Edit the nth command of the rc file. [Not working properly]"
+    ~aliases:["-modify" ; "--modify" ; "--edit" ; "-edit"]
+    ~doc:"[n] Edit the nth command of the rc file in your $EDITOR. May be used to add new entries."
 
     +> anon (maybe ("Command number" %: int)))
 ;;