Skip to content

Commit 94a555f

Browse files
Fix installed completions (#2034)
* Fix installed completions Fixes #2033 * Fix build failure for `dhall-openapi` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 5c503f0 commit 94a555f

File tree

9 files changed

+28
-4
lines changed

9 files changed

+28
-4
lines changed

dhall-docs/src/Dhall/Docs.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ parseOptions =
5353
<$> Options.Applicative.strOption
5454
( Options.Applicative.long "input"
5555
<> Options.Applicative.metavar "INPUT"
56-
<> Options.Applicative.help "Directory of your dhall package" )
56+
<> Options.Applicative.help "Directory of your dhall package"
57+
<> Options.Applicative.action "directory"
58+
)
5759
<*> Options.Applicative.strOption
5860
( Options.Applicative.long "output-link"
5961
<> Options.Applicative.metavar "OUTPUT-LINK"
@@ -62,7 +64,9 @@ parseOptions =
6264
<> "documentation. The path needs to not exist or to be a symlink, "
6365
<> "otherwise the tool won't generate any docs at all"
6466
)
65-
<> Options.Applicative.value "./docs" )
67+
<> Options.Applicative.value "./docs"
68+
<> Options.Applicative.action "directory"
69+
)
6670
<*> parsePackageNameResolver
6771
<*> parseAscii
6872
) <|> parseVersion

dhall-json/dhall-to-json/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@ parseOptions =
9292
( Options.long "file"
9393
<> Options.help "Read expression from a file instead of standard input"
9494
<> Options.metavar "FILE"
95+
<> Options.action "file"
9596
)
9697

9798
parseOutput =
9899
Options.strOption
99100
( Options.long "output"
100101
<> Options.help "Write JSON to a file instead of standard output"
101102
<> Options.metavar "FILE"
103+
<> Options.action "file"
102104
)
103105

104106
parserInfo :: ParserInfo Options

dhall-json/json-to-dhall/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ parseOptions =
108108
( Options.long "file"
109109
<> Options.help "Read JSON from a file instead of standard input"
110110
<> Options.metavar "FILE"
111+
<> Options.action "file"
111112
)
112113

113114
parseOutput =
114115
Options.strOption
115116
( Options.long "output"
116117
<> Options.help "Write Dhall expression to a file instead of standard output"
117118
<> Options.metavar "FILE"
119+
<> Options.action "file"
118120
)
119121

120122
parseASCII =

dhall-json/src/Dhall/DhallToYaml/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ parseOptions =
4848
( Options.long "file"
4949
<> Options.help "Read expression from a file instead of standard input"
5050
<> Options.metavar "FILE"
51+
<> Options.action "file"
5152
)
5253

5354
parseVersion =
@@ -62,6 +63,7 @@ parseOptions =
6263
( Options.long "output"
6364
<> Options.help "Write YAML to a file instead of standard output"
6465
<> Options.metavar "FILE"
66+
<> Options.action "file"
6567
)
6668

6769
parseNoEdit =

dhall-lsp-server/app/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ parseOptions =
3232
Options <$> parseMode <*> Options.Applicative.optional parseLogFile <*> parseVersion
3333
where
3434
parseLogFile = Options.Applicative.strOption
35-
(Options.Applicative.long "log" <> Options.Applicative.help
36-
"If present writes debug output to the specified file"
35+
( Options.Applicative.long "log"
36+
<> Options.Applicative.help "If present writes debug output to the specified file"
37+
<> Options.Applicative.action "file"
3738
)
3839

3940
parseVersion = Options.Applicative.switch

dhall-nixpkgs/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ parseFile =
188188
( Options.long "file"
189189
<> Options.help "File to import, relative to the top-level directory"
190190
<> Options.value "package.dhall"
191+
<> Options.action "file"
191192
)
192193

193194
parseSource :: Parser Bool
@@ -239,6 +240,7 @@ parseGitHub = do
239240
( Options.long "directory"
240241
<> Options.help "Subdirectory containing the Dhall package"
241242
<> Options.value ""
243+
<> Options.action "directory"
242244
)
243245

244246
file <- parseFile

dhall-openapi/openapi-to-dhall/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ parseOptions = Options <$> parseSkip <*> parsePrefixMap' <*> fileArg <*> crdArg
215215
fileArg = Options.Applicative.strArgument
216216
( Options.Applicative.help "The input file to read"
217217
<> Options.Applicative.metavar "FILE"
218+
<> Options.Applicative.action "file"
218219
)
219220
crdArg = Options.Applicative.switch
220221
( Options.Applicative.long "crd"

dhall-yaml/yaml-to-dhall/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ parseOptions =
105105
( Options.long "file"
106106
<> Options.help "Read YAML expression from a file instead of standard input"
107107
<> Options.metavar "FILE"
108+
<> Options.action "file"
108109
)
109110

110111
parseOutput =
111112
Options.strOption
112113
( Options.long "output"
113114
<> Options.help "Write Dhall expression to a file instead of standard output"
114115
<> Options.metavar "FILE"
116+
<> Options.action "file"
115117
)
116118

117119
parseASCII =

dhall/src/Dhall/Main.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ parseMode =
339339
( Options.Applicative.long "file"
340340
<> Options.Applicative.help "Read expression from a file instead of standard input"
341341
<> Options.Applicative.metavar "FILE"
342+
<> Options.Applicative.action "file"
342343
)
343344

344345
parseOutput = fmap f (optional p)
@@ -350,6 +351,7 @@ parseMode =
350351
( Options.Applicative.long "output"
351352
<> Options.Applicative.help "Write result to a file instead of standard output"
352353
<> Options.Applicative.metavar "FILE"
354+
<> Options.Applicative.action "file"
353355
)
354356

355357
parseAlpha =
@@ -410,6 +412,7 @@ parseMode =
410412
( Options.Applicative.long "inplace"
411413
<> Options.Applicative.help "Modify the specified file in-place"
412414
<> Options.Applicative.metavar "FILE"
415+
<> Options.Applicative.action "file"
413416
)
414417

415418
parseInplaceNonTransitive =
@@ -425,6 +428,7 @@ parseMode =
425428
( Options.Applicative.long "transitive"
426429
<> Options.Applicative.help "Modify the specified file and its transitive relative imports in-place"
427430
<> Options.Applicative.metavar "FILE"
431+
<> Options.Applicative.action "file"
428432
)
429433

430434
parseInput = fmap f (optional p)
@@ -436,6 +440,8 @@ parseMode =
436440
( Options.Applicative.long "path"
437441
<> Options.Applicative.help "Index all files in path recursively. Will get list of files from STDIN if omitted."
438442
<> Options.Applicative.metavar "PATH"
443+
<> Options.Applicative.action "file"
444+
<> Options.Applicative.action "directory"
439445
)
440446

441447
parseTagsOutput = fmap f (optional p)
@@ -447,6 +453,7 @@ parseMode =
447453
( Options.Applicative.long "output"
448454
<> Options.Applicative.help "The name of the file that the tags are written to. Defaults to \"tags\""
449455
<> Options.Applicative.metavar "FILENAME"
456+
<> Options.Applicative.action "file"
450457
)
451458

452459
parseSuffixes = fmap f (optional p)
@@ -508,6 +515,7 @@ parseMode =
508515
( Options.Applicative.long "output"
509516
<> Options.Applicative.help "The destination path to create"
510517
<> Options.Applicative.metavar "PATH"
518+
<> Options.Applicative.action "directory"
511519
)
512520

513521
parseNoted =

0 commit comments

Comments
 (0)