diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-15 14:33:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-15 14:33:37 -0400 |
commit | 9fe3c6d21134638a29c6ad4ced6a11ed9b0242ed (patch) | |
tree | 36969080623ed8f085b69cc0ae9673b724f8d87c /Command.hs | |
parent | 984c9fc0523bcd3bfcd7de83f4f7974daa6872bc (diff) |
clean up params in usage display
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 14 |
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 |