enableremote: List uuids and descriptions of remotes that can be enabled, and accept either the uuid or the description in leu if the name.

This commit is contained in:
Joey Hess 2015-10-26 14:55:40 -04:00
parent 016904f424
commit 640dba43b6
Failed to extract signature
7 changed files with 75 additions and 25 deletions

View file

@ -427,8 +427,9 @@ reposizes_stats = stat desc $ nojson $ do
. M.toList
<$> cachedRepoData
let maxlen = maximum (map (length . snd) l)
descm <- lift uuidDescriptions
-- This also handles json display.
s <- lift $ prettyPrintUUIDsWith (Just "size") desc $
s <- lift $ prettyPrintUUIDsWith (Just "size") desc descm $
map (\(u, sz) -> (u, Just $ mkdisp sz maxlen)) l
return $ countRepoList (length l) s
where