Skip to content

Commit 6ed03e8

Browse files
DCodeBotdector
andcommitted
feat(cli): add alias for --silent
Co-authored-by: D <code@dector.space>
1 parent 754bb69 commit 6ed03e8

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ror [flags] [task] [task args]
2020
## Flags
2121

2222
- `--export-taskfile`: Export `ror.kdl` to `Taskfile.yml` (for compatibility with [Task](https://taskfile.dev/)).
23+
- `-s`, `--silent`: Silent mode (no output).
2324
- `-v`: Verbose output.
2425
- `-vvv`: Very verbose output.
2526

‎cmd/ror/main.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func buildEnvAndArgs(io io.IO) (internal.Env, internal.ParsedArgs) {
8282
vLevel += 3
8383
case "-q", "--quiet":
8484
vLevel -= 1
85-
case "--silent":
85+
case "-s", "--silent":
8686
vLevel -= 2
8787
}
8888
}
@@ -234,7 +234,7 @@ func printUsage(io io.IO, env internal.Env) {
234234
io.Std().Println(cyan("Flags:"))
235235
io.Std().Printf(" %-25s%s\n", yellow("+list"), "List all available tasks")
236236
io.Std().Printf(" %-25s%s\n", yellow("--export-taskfile"), "Export ror.kdl to Taskfile.yml")
237-
io.Std().Printf(" %-25s%s\n", yellow("--silent"), "Silent mode (no output)")
237+
io.Std().Printf(" %-25s%s\n", yellow("-s, --silent"), "Silent mode (no output)")
238238
io.Std().Printf(" %-25s%s\n", yellow("-q, --quiet"), "Quiet mode (errors only)")
239239
io.Std().Printf(" %-25s%s\n", yellow("-v"), "Verbose output (level 1)")
240240
io.Std().Printf(" %-25s%s\n", yellow("-vv"), "Very verbose output (level 2)")

‎internal/commands/list.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func CmdListTasks(io io.IO, ctx internal.Context) {
4545
io.Std().Println("")
4646
io.Std().Println(cyan("Useful flags:"))
4747
io.Std().Printf(" %-25sList all available tasks\n", yellow("+list"))
48-
io.Std().Printf(" %-25sSilent mode (no output)\n", yellow("--silent"))
48+
io.Std().Printf(" %-25sSilent mode (no output)\n", yellow("-s, --silent"))
4949
io.Std().Printf(" %-25sQuiet mode (errors only)\n", yellow("-q, --quiet"))
5050
io.Std().Printf(" %-25sVerbose output (level 1)\n", yellow("-v"))
5151
io.Std().Printf(" %-25sVery verbose output (level 2)\n", yellow("-vv"))

0 commit comments

Comments
 (0)