Skip to content

Commit

Permalink
feat: added timed task output type
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 21, 2024
1 parent 7002a8a commit ee7c0aa
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/cli/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ 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
- `replacing` - Stdout is replaced each time, stderr is printed as is
- `lengthy` - Only show stdout lines if they are displayed for more than 1 second
- `timed` - Only show stdout lines if they are displayed for more than 1 second
- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output
- `quiet` - Don't show extra output
- `silent` - Don't show any output including stdout and stderr from the task except for errors
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/tasks/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ 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
- `replacing` - Stdout is replaced each time, stderr is printed as is
- `lengthy` - Only show stdout lines if they are displayed for more than 1 second
- `timed` - Only show stdout lines if they are displayed for more than 1 second
- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output
- `quiet` - Don't show extra output
- `silent` - Don't show any output including stdout and stderr from the task except for errors
Expand Down
4 changes: 2 additions & 2 deletions mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ 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 "-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\n- `interleave` - Print directly to stdout/stderr instead of by line\n- `replacing` - Stdout is replaced each time, stderr is printed as is\n- `lengthy` - Only show stdout lines if they are displayed for more than 1 second\n- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output\n- `quiet` - Don't show extra output\n- `silent` - Don't show any output including stdout and stderr from the task except for errors"
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\n- `interleave` - Print directly to stdout/stderr instead of by line\n- `replacing` - Stdout is replaced each time, stderr is printed as is\n- `timed` - Only show stdout lines if they are displayed for more than 1 second\n- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output\n- `quiet` - Don't show extra output\n- `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 @@ -1530,7 +1530,7 @@ 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 "-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\n- `interleave` - Print directly to stdout/stderr instead of by line\n- `replacing` - Stdout is replaced each time, stderr is printed as is\n- `lengthy` - Only show stdout lines if they are displayed for more than 1 second\n- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output\n- `quiet` - Don't show extra output\n- `silent` - Don't show any output including stdout and stderr from the task except for errors"
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\n- `interleave` - Print directly to stdout/stderr instead of by line\n- `replacing` - Stdout is replaced each time, stderr is printed as is\n- `timed` - Only show stdout lines if they are displayed for more than 1 second\n- `keep-order` - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output\n- `quiet` - Don't show extra output\n- `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
10 changes: 9 additions & 1 deletion schema/mise.json
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,15 @@
"task_output": {
"description": "Change output style when executing tasks.",
"type": "string",
"enum": ["prefix", "interleave", "keep-order", "quiet", "silent"]
"enum": [
"prefix",
"interleave",
"keep-order",
"replacing",
"timed",
"quiet",
"silent"
]
},
"task_run_auto_install": {
"default": true,
Expand Down
2 changes: 1 addition & 1 deletion settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ enum = [
],
[
"replacing",
"replace stdout each time a line is printed",
"replace stdout each time a line is printed"
],
[
"timed",
Expand Down

0 comments on commit ee7c0aa

Please sign in to comment.