Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update task list console output #1443

Merged
merged 11 commits into from
May 28, 2024

Conversation

vigneshmanick
Copy link
Contributor

Summary

update console output of task list

  • pixi task list prints all tasks inline rather than one per line
  • pixi task list -s prints tasks per environment

sample output below

image

resolve #1397

- `pixi task list` prints all tasks inline rather than one per line
- `pixi task list -s` prints tasks per environment
@vigneshmanick
Copy link
Contributor Author

vigneshmanick commented May 26, 2024

@ruben-arts have updated the commands output as mentioned in the issue. Please have a look. Documentation has not yet been updated. I would like to gather your opinion before proceeding.

The cli doc mentions that the summary argument provides a machine parsable output, i guess the new changes collide with that.

src/cli/task.rs Show resolved Hide resolved
src/cli/task.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, I have some more requests.

src/cli/task.rs Outdated Show resolved Hide resolved
src/cli/task.rs Outdated Show resolved Hide resolved
src/cli/task.rs Outdated Show resolved Hide resolved
@vigneshmanick vigneshmanick marked this pull request as ready for review May 27, 2024 14:36
src/cli/task.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thank you @vigneshmanick

src/cli/task.rs Outdated Show resolved Hide resolved
src/cli/task.rs Outdated Show resolved Hide resolved
@ruben-arts ruben-arts merged commit 8baa8ee into prefix-dev:main May 28, 2024
27 checks passed
@vigneshmanick vigneshmanick deleted the task-print branch May 28, 2024 08:02

fn print_tasks_per_env(envs: Vec<Environment>) -> io::Result<()> {
let mut writer = tabwriter::TabWriter::new(stdout());
for env in envs {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have been for env in envs.sorted() or something along those lines? In pixi 0.28.1 (the latest release) I see that the tasks are indeed sorted for pixi task list -s, but the order in which the environments are shown varies randomly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestions for pixi info and pixi task list terminal ouput
3 participants