Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/tasks/test_task_double_dash_behavior
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF

# Usage spec handles its own flags (parsed by usage spec, not passed as $@)
# shellcheck disable=SC2016
assert "mise run with_usage -x myfile 2>&1" '[with_usage] $ echo "custom=$usage_custom file=$usage_file args=$@"
assert "mise run with_usage -x myfile 2>&1" '[with_usage -x myfile] $ echo "custom=$usage_custom file=$usage_file args=$@"
custom=true file=myfile args='

# But mise flags still go to mise (myfile is consumed by usage spec, not passed to $@)
Expand Down
6 changes: 3 additions & 3 deletions e2e/tasks/test_task_run_depends
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ run = 'echo build'
[tasks.all]
depends = ['build a', 'build b', 'build c']
EOF
assert "mise run all | sort" "[build] build a
[build] build b
[build] build c"
assert "mise run all | sort" "[build a] build a
[build b] build b
[build c] build c"

cat <<EOF >mise.toml
[tasks.build1]
Expand Down
5 changes: 4 additions & 1 deletion src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,10 @@ impl Task {
}

pub fn prefix(&self) -> String {
format!("[{}]", self.display_name)
let max_width = 40;
let inner = format!("{} {}", self.display_name, self.args.join(" "));
let inner = inner.trim();
format!("[{}]", console::truncate_str(inner, max_width, "…"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant module path prefix on imported function

truncate_str is already directly imported on line 10 via use console::{Color, measure_text_width, truncate_str};, and the existing usage at line 1290 calls it without the module prefix. Using the full path console::truncate_str is inconsistent with both.

Suggested change
format!("[{}]", console::truncate_str(inner, max_width, "…"))
format!("[{}]", truncate_str(inner, max_width, "…"))

Fix in Claude Code

}

pub fn run(&self) -> &Vec<RunEntry> {
Expand Down
Loading