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

progress: Improve the Progress Plugin #622

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

RobLoach
Copy link
Contributor

@RobLoach RobLoach commented Oct 3, 2024

This change improves the progress plugin by...

  • Allows reseting the progress bar to allow running another progress bar after the first one is done
  • Replaces the message whitespace so that there's no overlap in messages
  • Scopes the variables within the function
  • Renames the global variable so that it's namespaced a bit

Here's a good way to test it...

progress 0 "Doing something cool!" && progress 40 "Hello?" && progress 60 "Almost done" && progress 100 "Close" && delay

plugins/progress/progress.plugin.sh Outdated Show resolved Hide resolved
plugins/progress/progress.plugin.sh Outdated Show resolved Hide resolved
plugins/progress/progress.plugin.sh Outdated Show resolved Hide resolved
plugins/progress/progress.plugin.sh Outdated Show resolved Hide resolved
plugins/progress/progress.plugin.sh Outdated Show resolved Hide resolved
delay
printf "%s\n" "$clear_line"
value=0
fi;
Copy link
Contributor

Choose a reason for hiding this comment

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

The message Done! seems to have been dropped. Is this an intentional behavioral change? What is the rationale?

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.

2 participants