Skip to content

Commit eccae04

Browse files
mvanhornclaude
andcommitted
Hide version info in pixi search -l 0 output
When the version limit is set to 0, only print bare package names without version counts, version lines, or "more versions" hints. This gives a clean list suitable for piping or scripting. Fixes #5763 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 27cc871 commit eccae04

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/pixi_cli/src/search.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ fn print_search_results<W: Write>(
223223
if i >= n_packages {
224224
break;
225225
}
226+
227+
// When limit is 0, show only package names with no version info
228+
if n_versions == 0 {
229+
writeln!(out, "{}", console::style(name.as_source()).green().bold())?;
230+
continue;
231+
}
232+
226233
if i > 0 {
227234
writeln!(out)?;
228235
}

0 commit comments

Comments
 (0)