Skip to content

Commit

Permalink
Tweak documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Dec 3, 2023
1 parent 3c7366f commit 00e0e7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@

```
$ cabal-add --help
Usage: cabal-add (-f|--cabal-file FILE) [-c|--component ARG] DEP
Usage: cabal-add [-f|--cabal-file FILE] [-c|--component ARG] DEP
Extend build-depends from the command line
Available options:
-f,--cabal-file FILE Cabal file to edit in place.
-f,--cabal-file FILE Cabal file to edit in place (tries to detect Cabal
file in current folder if omitted).
-c,--component ARG Package component to update (the main library, if
omitted). Wildcards such as 'exe', 'test' or 'bench'
are supported.
DEP Package(s) to add to build-depends section. Version
bounds can be provided as well, use quotes to escape
comparisons from your shell. E. g., 'foo < 0.2'.
```

`cabal-add` does not have limitations of
[`cabal-edit`](https://hackage.haskell.org/package/cabal-edit):
it works on any sectioned Cabal file,
supports stanzas and conditional blocks,
and preserves original formatting.
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ parseRawConfig = do
long "cabal-file"
<> short 'f'
<> metavar "FILE"
<> help "Cabal file to edit in place (tries to detect cabal file in current folder if omitted)."
<> help "Cabal file to edit in place (tries to detect Cabal file in current folder if omitted)."
rcnfComponent <-
optional $
strOption $
Expand Down
3 changes: 3 additions & 0 deletions cabal-add.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ description:
Extend build-depends from the command line.
Allows to specify Cabal file, target component
and multiple dependencies with version bounds.
It works on any sectioned Cabal file,
supports stanzas and conditional blocks,
and preserves original formatting.

category: Development
build-type: Simple
Expand Down

0 comments on commit 00e0e7b

Please sign in to comment.