Skip to content

Commit

Permalink
docs: describe behavior of run --output better (jdx#3740)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored and miguelmig committed Dec 21, 2024
1 parent 6d10317 commit afca96a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/cli/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ Don't show extra output

Don't show any output except for errors

### `--output <OUTPUT>`
### `-o --output <OUTPUT>`

Change how tasks information is output when running tasks

- `prefix` - Print stdout/stderr by line, prefixed with the task's label - `interleave` - Print directly to stdout/stderr instead of by line - `quiet` - Don't show extra output - `silent` - Don't show any output including stdout and stderr from the task except for errors

Examples:

Expand Down
6 changes: 5 additions & 1 deletion docs/cli/tasks/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ Don't show extra output

Don't show any output except for errors

### `--output <OUTPUT>`
### `-o --output <OUTPUT>`

Change how tasks information is output when running tasks

- `prefix` - Print stdout/stderr by line, prefixed with the task's label - `interleave` - Print directly to stdout/stderr instead of by line - `quiet` - Don't show extra output - `silent` - Don't show any output including stdout and stderr from the task except for errors

Examples:

Expand Down
6 changes: 4 additions & 2 deletions mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,8 @@ The name of the script will be the name of the tasks.
}
flag "-q --quiet" help="Don't show extra output"
flag "-S --silent" help="Don't show any output except for errors"
flag "--output" {
flag "-o --output" help="Change how tasks information is output when running tasks" {
long_help "Change how tasks information is output when running tasks\n\n- `prefix` - Print stdout/stderr by line, prefixed with the task's label - `interleave` - Print directly to stdout/stderr instead of by line - `quiet` - Don't show extra output - `silent` - Don't show any output including stdout and stderr from the task except for errors"
arg "<OUTPUT>"
}
mount run="mise tasks --usage"
Expand Down Expand Up @@ -1527,7 +1528,8 @@ The name of the script will be the name of the tasks.
}
flag "-q --quiet" help="Don't show extra output"
flag "-S --silent" help="Don't show any output except for errors"
flag "--output" {
flag "-o --output" help="Change how tasks information is output when running tasks" {
long_help "Change how tasks information is output when running tasks\n\n- `prefix` - Print stdout/stderr by line, prefixed with the task's label - `interleave` - Print directly to stdout/stderr instead of by line - `quiet` - Don't show extra output - `silent` - Don't show any output including stdout and stderr from the task except for errors"
arg "<OUTPUT>"
}
arg "[TASK]" help="Tasks to run\nCan specify multiple tasks by separating with `:::`\ne.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2" required=false default="default"
Expand Down
8 changes: 7 additions & 1 deletion src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ pub struct Run {
#[clap(skip)]
pub failed_tasks: Mutex<Vec<(Task, i32)>>,

#[clap(long)]
/// Change how tasks information is output when running tasks
///
/// - `prefix` - Print stdout/stderr by line, prefixed with the task's label
/// - `interleave` - Print directly to stdout/stderr instead of by line
/// - `quiet` - Don't show extra output
/// - `silent` - Don't show any output including stdout and stderr from the task except for errors
#[clap(short, long, env = "MISE_TASK_OUTPUT")]
pub output: Option<TaskOutput>,

#[clap(skip)]
Expand Down
4 changes: 4 additions & 0 deletions xtasks/fig/src/mise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2009,8 +2009,10 @@ const completionSpec: Fig.Spec = {
},
{
"name": [
"-o",
"--output"
],
"description": "Change how tasks information is output when running tasks",
"isRepeatable": false,
"args": {
"name": "output",
Expand Down Expand Up @@ -2915,8 +2917,10 @@ const completionSpec: Fig.Spec = {
},
{
"name": [
"-o",
"--output"
],
"description": "Change how tasks information is output when running tasks",
"isRepeatable": false,
"args": {
"name": "output",
Expand Down

0 comments on commit afca96a

Please sign in to comment.