Added metadata --batch option, which allows getting, setting, deleting, and modifying metadata for multiple files/keys.

This commit is contained in:
Joey Hess 2016-07-27 10:46:25 -04:00
parent e5225f08fc
commit bf3327ff25
Failed to extract signature
8 changed files with 126 additions and 38 deletions

View file

@ -63,7 +63,7 @@ parseModMeta p = case lastMaybe f of
Just '+' -> AddMeta <$> mkMetaField f' <*> v
Just '-' -> DelMeta <$> mkMetaField f' <*> (Just <$> v)
Just '?' -> MaybeSetMeta <$> mkMetaField f' <*> v
_ -> SetMeta <$> mkMetaField f <*> v
_ -> SetMeta <$> mkMetaField f <*> (S.singleton <$> v)
where
(f, sv) = separate (== '=') p
f' = beginning f