Skip to content

Commit

Permalink
refactor(cli): reworked cli output
Browse files Browse the repository at this point in the history
  • Loading branch information
xNaCly committed Apr 11, 2023
1 parent c8d04b2 commit 58536ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ func ParseCli() Arguments {
}

func PrintShortHelp() {
fmt.Println(`
Usage:
fleck [OPTIONS] file
fmt.Println(`Usage:
fleck [Options] file
Options:`)
for _, v := range OPTIONS {
fmt.Printf("\t--%s: %s\n", v.Name, v.Description)
fmt.Printf("\t--%-20s\t\t%s\n", v.Name, v.Description)
}
fmt.Println("")
}
Expand Down
12 changes: 6 additions & 6 deletions doc/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Calling `fleck` without any arguments results in an error and displays the help

```text
Usage:
fleck [OPTIONS] file
fleck [Options] file
Options:
--silent: disables info logs, reduces output significantly
--keep-temp: keeps fleck from removing temporary files, used for debug purposes
--preprocessor-enabled: enables the preprocessor to replace macros, decreases performance
--shell-macro-enabled: enables the dangerous '@shell{command}' macro, which allows the preprocessor to run any command on your system
--silent disables info logs, reduces output significantly
--keep-temp keeps fleck from removing temporary files, used for debug purposes
--preprocessor-enabled enables the preprocessor to replace macros, decreases performance
--shell-macro-enabled enables the dangerous '@shell{command}' macro, which allows the preprocessor to run any command on your system
2023/04/11 10:21:36 error: not enough arguments, specify an input file
2023/04/11 11:42:40 error: not enough arguments, specify an input file
exit status 1
```

Expand Down

0 comments on commit 58536ce

Please sign in to comment.