cli: insert -> add
This commit is contained in:
@@ -33,7 +33,7 @@ cmd_ =
|
|||||||
O.progDesc "Manage content collections"
|
O.progDesc "Manage content collections"
|
||||||
]
|
]
|
||||||
|
|
||||||
data CollectionCmd = CollectionInsert
|
data CollectionCmd = CollectionAdd
|
||||||
{ filePath :: CollectionPath
|
{ filePath :: CollectionPath
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,13 +59,13 @@ instance Show CollectionPath where
|
|||||||
collectionCmd :: O.Parser Cmd
|
collectionCmd :: O.Parser Cmd
|
||||||
collectionCmd =
|
collectionCmd =
|
||||||
fmap Collection . O.hsubparser . mconcat $
|
fmap Collection . O.hsubparser . mconcat $
|
||||||
[ O.command "insert" . O.info collectionInsertCmd $
|
[ O.command "add" . O.info collectionAddCmd $
|
||||||
O.progDesc "Insert an entity"
|
O.progDesc "Add an entity"
|
||||||
]
|
]
|
||||||
|
|
||||||
collectionInsertCmd :: O.Parser CollectionCmd
|
collectionAddCmd :: O.Parser CollectionCmd
|
||||||
collectionInsertCmd =
|
collectionAddCmd =
|
||||||
CollectionInsert
|
CollectionAdd
|
||||||
<$> collectionPathArg
|
<$> collectionPathArg
|
||||||
|
|
||||||
collectionPathArg :: O.Parser CollectionPath
|
collectionPathArg :: O.Parser CollectionPath
|
||||||
@@ -78,7 +78,7 @@ main = do
|
|||||||
Args
|
Args
|
||||||
{ cmd =
|
{ cmd =
|
||||||
Collection
|
Collection
|
||||||
CollectionInsert
|
CollectionAdd
|
||||||
{ filePath = CollectionPath {collectionName, fileName}
|
{ filePath = CollectionPath {collectionName, fileName}
|
||||||
}
|
}
|
||||||
} ->
|
} ->
|
||||||
|
|||||||
Reference in New Issue
Block a user