Skip to content

Commit

Permalink
fix the indentation in --help and --fullhelp (#15387)
Browse files Browse the repository at this point in the history
* fix the indentation in `--help` and `--fullhelp`

* a better way to fix it
  • Loading branch information
narimiran authored Sep 23, 2020
1 parent 94c8d53 commit fe3211f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions compiler/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ proc genFeatureDesc[T: enum](t: typedesc[T]): string {.compileTime.} =
result.add $f

const
Usage = slurp"../doc/basicopt.txt".replace(" //", " ")
AdvancedUsage = slurp"../doc/advopt.txt".replace(" //", " ") % [genFeatureDesc(Feature), genFeatureDesc(LegacyFeature)]
Usage = slurp"../doc/basicopt.txt".replace(" //", " ")
AdvancedUsage = slurp"../doc/advopt.txt".replace(" //", " ") % [genFeatureDesc(Feature), genFeatureDesc(LegacyFeature)]

proc getCommandLineDesc(conf: ConfigRef): string =
result = (HelpMessage % [VersionAsString, platform.OS[conf.target.hostOS].name,
Expand Down
4 changes: 2 additions & 2 deletions doc/advopt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Advanced commands:
//ctags create a tags file
//buildIndex build an index for the whole documentation
//genDepend generate a DOT file containing the
module dependency graph
module dependency graph
//dump dump all defined conditionals and search paths
see also: --dump.format:json (useful with: ` | jq`)
see also: --dump.format:json (useful with: ` | jq`)
//check checks the project for syntax and semantic

Runtime checks (see -x):
Expand Down
10 changes: 5 additions & 5 deletions doc/basicopt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
nim command [options] [projectfile] [arguments]

Command:
//compile, c compile project with default code generator (C)
//r compile to $nimcache/projname, run with [arguments]
using backend specified by `--backend` (default: c)
//doc generate the documentation for inputfile for
backend specified by `--backend` (default: c)
//compile, c compile project with default code generator (C)
//r compile to $nimcache/projname, run with [arguments]
using backend specified by `--backend` (default: c)
//doc generate the documentation for inputfile for
backend specified by `--backend` (default: c)

Arguments:
arguments are passed to the program being run (if --run option is selected)
Expand Down

0 comments on commit fe3211f

Please sign in to comment.