Parcourir la source

Change --elength argument of list command

 + --elength is quite hard to understand compared to --length.
 + The old is kept, for compatibility.
 + Update CHANGELOG
Leo il y a 9 ans
Parent
commit
4b934a9923
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 1
      CHANGELOG.md
  2. 2 1
      src/command_def.ml

+ 1 - 1
CHANGELOG.md

@@ -34,7 +34,7 @@ This version introduce major changes in the tmp and rc file.
       command or the next one. The problem is that you can't call it with an
       option. To do this, use the **`run` subcommand**.
  + Improve **list subcommand**, now using Textutils library, displaying in an
-   array. Add `--el` argument to limit the length of displayed entries.
+   array. Add `--length` argument to limit the length of displayed entries.
  + Improve **edit subcommand** (explain how to use to add commands, improve
    messages, offer to reedit when nothing was done).
 

+ 2 - 1
src/command_def.ml

@@ -138,7 +138,8 @@ let list =
     Spec.(
       empty
       +> shared_params
-    +> flag "--el" (optional int)
+    +> flag "-l" (optional int)
+    ~aliases:[ "--length" ; "-length" ; "--elength" ; "-elength" ]
          ~doc:" Max length of displayed entries, 0 keeps as-is"
   )
   (fun { rc } length () ->