summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-06 21:51:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-06 21:51:39 -0400
commit64f9d00bedd1d035ec3b465c24ee324184e0a792 (patch)
tree55ea9aa4987f0b52be02623af5d5c0f30bcbc96f
parent2557bb876426d9d72f195f041b4efb43153725bd (diff)
tweak
-rw-r--r--Command/Log.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Command/Log.hs b/Command/Log.hs
index d59c8efd8..4a2bb7a7f 100644
--- a/Command/Log.hs
+++ b/Command/Log.hs
@@ -37,13 +37,13 @@ def = [withOptions options $
command "log" paramPaths seek "shows location log"]
options :: [Option]
-options =
- [ Option.field [] "since" paramDate "show log since date"
- , Option.field [] "after" paramDate "show log after date"
- , Option.field [] "until" paramDate "show log until date"
- , Option.field [] "before" paramDate "show log before date"
- , Option.field ['n'] "max-count" paramNumber "limit number of logs displayed"
+options = map odate ["since", "after", "until", "before"] ++
+ [ Option.field ['n'] "max-count" paramNumber
+ "limit number of logs displayed"
]
+ where
+ odate n = Option.field [] n paramDate $
+ "show log " ++ n ++ " date"
seek :: [CommandSeek]
seek = [withValue (concat <$> mapM getoption options) $ \os ->