diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-02-29 13:00:46 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-02-29 13:00:46 -0400 |
commit | 25b87aadd8bdca484f1fb073c38e169ee2bc7503 (patch) | |
tree | a34a85fd37f979ac64f617bef01a1957a0a2b622 /Command | |
parent | 5b23c5d3baa15ca1200b2ee349b924c1d8395665 (diff) |
metadata: Added -r to remove all current values of a field.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/MetaData.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Command/MetaData.hs b/Command/MetaData.hs index 1209a5836..e2afccb9b 100644 --- a/Command/MetaData.hs +++ b/Command/MetaData.hs @@ -46,10 +46,14 @@ optParser desc = MetaDataOptions ( long "tag" <> short 't' <> metavar "TAG" <> help "set a tag" )) - <|> (DelMeta tagMetaField . toMetaValue <$> strOption + <|> (DelMeta tagMetaField . Just . toMetaValue <$> strOption ( long "untag" <> short 'u' <> metavar "TAG" <> help "remove a tag" )) + <|> option (eitherReader (\f -> DelMeta <$> mkMetaField f <*> pure Nothing)) + ( long "remove" <> short 'r' <> metavar "FIELD" + <> help "remove all values of a field" + ) seek :: MetaDataOptions -> CommandSeek seek o = do |