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

Specify which version of the tool was actually downloaded #49

Closed
2 tasks
chshersh opened this issue Aug 29, 2022 · 0 comments · Fixed by #60
Closed
2 tasks

Specify which version of the tool was actually downloaded #49

chshersh opened this issue Aug 29, 2022 · 0 comments · Fixed by #60
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chshersh
Copy link
Owner

chshersh commented Aug 29, 2022

This could be a helpful improvement in the output. I imagine the output to be of the form:

  rg  (v13.0.0) Completed!
  exa (v0.10.1) Completed!

To do this:

  • Add tag_name to the Release type here
  • Patfh prefix formatting to specify the tool version as well
    • fn fmt_prefix(&self, emoji: Emoji, tool_name: &str) -> String {
      let aligned_tool = format!("{:width$}", tool_name, width = self.max_tool_size);
      format!("{}{}", emoji, aligned_tool)
      }

This may require to add more formatting options:

pub struct SyncProgress {
max_tool_size: usize,
multi_progress: MultiProgress,
}

@chshersh chshersh added enhancement New feature or request good first issue Good for newcomers labels Aug 29, 2022
@chshersh chshersh added this to the v0.2.0: Improved sync milestone Aug 30, 2022
chshersh pushed a commit that referenced this issue Sep 3, 2022
This resolves #49

I took a stab at implementing this but Im not sure if my approach is the right
way to go. Because the list of tools is already known before actually calling
the github api the length of these names is also known. This is not that case
with the `tag_name`. The tags from the example file are all less than 7 long but
that does not guarantee other repos.

I could try and check what tags are available for all tools before actually
downloading them. Can I get your input on this?


```bash
$ cargo run -- --config tools.toml sync
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/tool --config tools.toml sync`
✅  bat        v0.21.0  Completed!
✅  difftastic 0.34.0   Completed!
✅  exa        v0.10.1  Completed!
✅  fd         v8.4.0   Completed!
✅  ripgrep    13.0.0   Completed!
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant