Skip to content

Commit

Permalink
ls-remote: sort by plugin name (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Dec 12, 2023
1 parent 9d78768 commit 22c27ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli/ls_remote.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -74,7 +75,10 @@ impl LsRemote {
let versions = p.list_remote_versions(&config.settings)?;
Ok((p, versions))
})
.collect::<Result<Vec<_>>>()?;
.collect::<Result<Vec<_>>>()?
.into_iter()
.sorted_by_cached_key(|(p, _)| p.name().to_string())
.collect::<Vec<_>>();
for (plugin, versions) in versions {
for v in versions {
rtxprintln!(out, "{}@{v}", plugin);
Expand Down

0 comments on commit 22c27ee

Please sign in to comment.