summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-15 14:33:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-15 14:33:37 -0400
commit9fe3c6d21134638a29c6ad4ced6a11ed9b0242ed (patch)
tree36969080623ed8f085b69cc0ae9673b724f8d87c /Command.hs
parent984c9fc0523bcd3bfcd7de83f4f7974daa6872bc (diff)
clean up params in usage display
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/Command.hs b/Command.hs
index 9d85fbe9d..c1069f0d9 100644
--- a/Command.hs
+++ b/Command.hs
@@ -212,12 +212,8 @@ notSymlink :: FilePath -> IO Bool
notSymlink f = liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f
{- Descriptions of params used in usage messages. -}
-paramRepeating :: String -> String
-paramRepeating s = s ++ " ..."
-paramOptional :: String -> String
-paramOptional s = "[" ++ s ++ "]"
-paramPair :: String -> String -> String
-paramPair a b = a ++ " " ++ b
+paramPaths :: String
+paramPaths = paramOptional $ paramRepeating paramPath -- most often used
paramPath :: String
paramPath = "PATH"
paramKey :: String
@@ -240,6 +236,12 @@ paramKeyValue :: String
paramKeyValue = "K=V"
paramNothing :: String
paramNothing = ""
+paramRepeating :: String -> String
+paramRepeating s = s ++ " ..."
+paramOptional :: String -> String
+paramOptional s = "[" ++ s ++ "]"
+paramPair :: String -> String -> String
+paramPair a b = a ++ " " ++ b
{- The Key specified by the --key parameter. -}
cmdlineKey :: Annex Key