Skip to content

Commit

Permalink
Re #4343 Update in-app docs for dot and ls dependencies commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Aug 7, 2024
1 parent 7698c0e commit bb73a43
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/Stack/Options/DotParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import Data.List.Split ( splitOn )
import qualified Data.Set as Set
import Distribution.Types.PackageName ( mkPackageName )
import Options.Applicative
( Parser, auto, help, idm, long, metavar, option, strOption
, switch
( Parser, auto, completer, help, idm, long, metavar, option
, strOption, switch
)
import Options.Applicative.Builder.Extra ( boolFlags )
import Stack.Options.BuildParser ( flagsParser, targetsParser )
import Options.Applicative.Builder.Extra ( boolFlags, textArgument )
import Stack.Options.BuildParser ( flagsParser )
import Stack.Options.Completion ( targetCompleter )
import Stack.Prelude
import Stack.Types.DotOpts ( DotOpts (..) )

Expand Down Expand Up @@ -52,6 +53,17 @@ dotOptsParser externalDefault = DotOpts
<> help "Prune specified package(s). PACKAGES is a comma-separated list of \
\package names."
))

targetsParser :: Parser [Text]
targetsParser =
many (textArgument
( metavar "TARGET"
<> completer targetCompleter
<> help "Can be specified multiple times. If none specified, use all \
\project packages. Ignores project package components and \
\non-project packages."
))

testTargets = switch
( long "test"
<> help "Consider dependencies of test components."
Expand Down

0 comments on commit bb73a43

Please sign in to comment.