diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-08 15:08:02 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-08 15:08:02 -0400 |
commit | e7e61fb6cbe5455ded9bb550a64121223c099fc2 (patch) | |
tree | 003a99697256ea516ad40f9fbdb854996b58c0cd /Command/MetaData.hs | |
parent | 8879c96d157f06bbd2372064251676b7927ce38e (diff) |
convert all commands to work with optparse-applicative
Still no options though.
Diffstat (limited to 'Command/MetaData.hs')
-rw-r--r-- | Command/MetaData.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Command/MetaData.hs b/Command/MetaData.hs index d6adb0ad4..3b38c8b95 100644 --- a/Command/MetaData.hs +++ b/Command/MetaData.hs @@ -18,8 +18,9 @@ import Data.Time.Clock.POSIX cmd :: Command cmd = withOptions metaDataOptions $ - command "metadata" paramPaths seek - SectionMetaData "sets or gets metadata of a file" + command "metadata" + SectionMetaData "sets or gets metadata of a file" + paramPaths (withParams seek) metaDataOptions :: [Option] metaDataOptions = @@ -52,7 +53,7 @@ untagOption = Option ['u'] ["untag"] (ReqArg mkmod "TAG") "remove a tag" where mkmod = storeModMeta . AddMeta tagMetaField . mkMetaValue (CurrentlySet False) -seek :: CommandSeek +seek :: CmdParams -> CommandSeek seek ps = do modmeta <- Annex.getState Annex.modmeta getfield <- getOptionField getOption $ \ms -> |