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

fix: Highlight or mark installed versions when running asdf list all <name> #1192

Closed
wants to merge 1 commit into from
Closed

Conversation

roele
Copy link

@roele roele commented Apr 1, 2022

Summary

Color highlight installed versions of the list-all command.

Note: It seems asdf does not use colors anywhere, hence we might decide to use another indicator (e.g. ). Simply appending (installed) is visually not distinctive enough IMO. If an icon like indicator is used we might have to think about consistent output formatting.

Uses the internal function list_installed_versions to get all installed versions and adds a color highlight during output iteration.

Since the command latest [--all] uses the command list-all as fallback to get versions, any output format change breaks this functionality. Hence i decided to create an (internal) function list_all_versions which can be used by both commands.

The change lead the test [latest_command - dummy_legacy_plugin] No stable version should return an error to fail which i could not figure out why. It's expecting no output even though the code actually outputs an error "No compatible versions available ($plugin_name $query)". For now i came to the conclusion that maybe previous behaviour might have been faulty.

Fixes: #1152

@roele roele requested a review from a team as a code owner April 1, 2022 14:53
@roele
Copy link
Author

roele commented May 24, 2022

Removed colored output, fixed tests, shellcheck and shfmt.

@roele roele closed this by deleting the head repository Feb 10, 2023
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.

Highlight or mark installed versions when running asdf list all <name>
1 participant