convert all commands to work with optparse-applicative
Still no options though.
This commit is contained in:
parent
3125da54f6
commit
6e5c1f8db3
99 changed files with 391 additions and 297 deletions
|
@ -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 ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue