add intro
This commit is contained in:
parent
0186f06744
commit
326617ad2f
5 changed files with 97 additions and 10 deletions
10
Remote.hs
10
Remote.hs
|
@ -24,6 +24,7 @@ module Remote (
|
|||
uuidDescriptions,
|
||||
byName,
|
||||
prettyPrintUUIDs,
|
||||
prettyListUUIDs,
|
||||
remotesWithUUID,
|
||||
remotesWithoutUUID,
|
||||
keyLocations,
|
||||
|
@ -128,6 +129,15 @@ prettyPrintUUIDs desc uuids = do
|
|||
, ("here", toJSON $ hereu == u)
|
||||
]
|
||||
|
||||
{- List of remote names and/or descriptions, for human display.
|
||||
- Omits the current repisitory. -}
|
||||
prettyListUUIDs :: [UUID] -> Annex [String]
|
||||
prettyListUUIDs uuids = do
|
||||
hereu <- getUUID
|
||||
m <- uuidDescriptions
|
||||
return $ map (\u -> M.findWithDefault "" u m) $
|
||||
filter (/= hereu) uuids
|
||||
|
||||
{- Filters a list of remotes to ones that have the listed uuids. -}
|
||||
remotesWithUUID :: [Remote] -> [UUID] -> [Remote]
|
||||
remotesWithUUID rs us = filter (\r -> uuid r `elem` us) rs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue