summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-23 14:54:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-23 14:54:59 -0400
commitfee52648028b8ef1ddb4506b6383a62186fbdbc2 (patch)
tree377f054e6db00ffb9cd31c3ddf7c892ec1d8975b /Command
parent5bc8e4b6312ce2af5a62bb0bf09f392dcd66a6b1 (diff)
list standard groups in vicfg
Diffstat (limited to 'Command')
-rw-r--r--Command/Vicfg.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Command/Vicfg.hs b/Command/Vicfg.hs
index ad0fa0201..b176e5597 100644
--- a/Command/Vicfg.hs
+++ b/Command/Vicfg.hs
@@ -21,6 +21,7 @@ import Types.Group
import Logs.Trust
import Logs.Group
import Logs.PreferredContent
+import Types.StandardGroups
import Remote
def :: [Command]
@@ -94,20 +95,23 @@ genCfg cfg descs = unlines $ concat [intro, trust, groups, preferredcontent]
trust = settings cfgTrustMap
[ ""
, com "Repository trust configuration"
- , com "(Valid trust levels: " ++
- unwords (map showTrustLevel [Trusted .. DeadTrusted]) ++
- ")"
+ , com "(Valid trust levels: " ++ trustlevels ++ ")"
]
(\(t, u) -> line "trust" u $ showTrustLevel t)
(\u -> lcom $ line "trust" u $ showTrustLevel SemiTrusted)
+ where
+ trustlevels = unwords $ map showTrustLevel [Trusted .. DeadTrusted]
groups = settings cfgGroupMap
[ ""
, com "Repository groups"
+ , com $ "(Standard groups: " ++ grouplist ++ ")"
, com "(Separate group names with spaces)"
]
(\(s, u) -> line "group" u $ unwords $ S.toList s)
(\u -> lcom $ line "group" u "")
+ where
+ grouplist = unwords $ map fromStandardGroup [minBound..]
preferredcontent = settings cfgPreferredContentMap
[ ""