From 22c27ee6f504c84e87b1df4927dca8d294aae273 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:43:35 -0600 Subject: [PATCH] ls-remote: sort by plugin name (#1142) --- src/cli/ls_remote.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli/ls_remote.rs b/src/cli/ls_remote.rs index 20e98bb5a..ea2f90b41 100644 --- a/src/cli/ls_remote.rs +++ b/src/cli/ls_remote.rs @@ -1,6 +1,7 @@ use std::sync::Arc; use color_eyre::eyre::Result; +use itertools::Itertools; use rayon::prelude::*; use crate::cli::args::tool::ToolArg; @@ -74,7 +75,10 @@ impl LsRemote { let versions = p.list_remote_versions(&config.settings)?; Ok((p, versions)) }) - .collect::>>()?; + .collect::>>()? + .into_iter() + .sorted_by_cached_key(|(p, _)| p.name().to_string()) + .collect::>(); for (plugin, versions) in versions { for v in versions { rtxprintln!(out, "{}@{v}", plugin);