--all for get, move, and copy

This commit is contained in:
Joey Hess 2013-07-03 13:55:50 -04:00
parent def7cb706f
commit b337a8b4c7
5 changed files with 89 additions and 57 deletions

View file

@ -122,8 +122,8 @@ withNothing :: CommandStart -> CommandSeek
withNothing a [] = return [a]
withNothing _ _ = error "This command takes no parameters."
{- If --all is specified, runs an action on all logged keys.
- Otherwise, fall back to a regular CommandSeek action on
{- If --all is specified, or in a bare repo, runs an action on all
- known keys. Otherwise, fall back to a regular CommandSeek action on
- whatever params were passed. -}
withAll :: (Key -> CommandStart) -> CommandSeek -> CommandSeek
withAll allop fallbackop params = go =<< (Annex.getFlag "all" <||> isbare)