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

cause list-all argument to give perl-build versions in opposite order #3

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

faelin
Copy link
Contributor

@faelin faelin commented Feb 27, 2021

ASDF latest arg grabs last entry from list-all command, meaning that the list of available Perl definitions should be printed in the reverse of the order provided by perl-build (as in, the latest version should come last).

ASDF `latest` arg grabs *last* entry from `list-all` command, meaning that the list of available Perl definitions should be printed in the reverse of order provided by perl-build.
bin/list-all Outdated
@@ -4,7 +4,7 @@ source "$(dirname "$0")/utils.sh"

list_all() {
install_or_update_perl_build
$(perl_build_path) --definitions | tr '\n' ' '
$(perl_build_path) --definitions | tr '\n' ' ' | tail -r

Choose a reason for hiding this comment

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

tail -r isn't portable (only in BSD tail), and this pipe needs to come before the newlines are translated, I believe?

For example, if tac is available, this does what's intended:

  $(perl_build_path) --definitions | tac | tr '\n' ' '

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's a good point. tac would be preferable.

@ouest
Copy link
Owner

ouest commented Nov 30, 2021

@faelin @oeuftete @wren
Sorry for the late response.
No problem, merged it.

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.

None yet

3 participants