summaryrefslogtreecommitdiff
path: root/app/SlackBuilder
diff options
context:
space:
mode:
Diffstat (limited to 'app/SlackBuilder')
-rw-r--r--app/SlackBuilder/CommandLine.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/SlackBuilder/CommandLine.hs b/app/SlackBuilder/CommandLine.hs
index 53a6bfb..4890567 100644
--- a/app/SlackBuilder/CommandLine.hs
+++ b/app/SlackBuilder/CommandLine.hs
@@ -7,7 +7,6 @@ module SlackBuilder.CommandLine
) where
import Data.Text (Text)
-import qualified Data.Text as Text
import Options.Applicative
( Parser
, ParserInfo(..)
@@ -21,7 +20,7 @@ import Options.Applicative
)
data SlackBuilderCommand
- = TextCommand TextArguments
+ = CategoryCommand Text
| SlackBuildCommand Text Text
| CommitCommand Text Text
| ExistsCommand Text
@@ -47,16 +46,12 @@ data TextArguments = TextArguments
, textURL :: Text
}
-textArguments :: Parser TextArguments
-textArguments = TextArguments Text.strip
- <$> argument str (metavar "URL")
-
slackBuilderParser :: ParserInfo SlackBuilderCommand
slackBuilderParser = info slackBuilderCommand fullDesc
slackBuilderCommand :: Parser SlackBuilderCommand
slackBuilderCommand = subparser
- $ command "text" (info (TextCommand <$> textArguments) mempty)
+ $ command "category" (info categoryCommand mempty)
<> command "slackbuild" (info slackBuildCommand mempty)
<> command "commit" (info commitCommand mempty)
<> command "exists" (info existsCommand mempty)
@@ -66,6 +61,8 @@ slackBuilderCommand = subparser
<> command "deploy" (info deployCommand mempty)
<> command "up2date" (info up2DateCommand mempty)
where
+ categoryCommand = CategoryCommand
+ <$> argument str (metavar "PKGNAM")
slackBuildCommand = SlackBuildCommand
<$> argument str (metavar "PATH")
<*> argument str (metavar "VERSION")