From 029be3cbecca499d42d3466766f03ce18cef9f25 Mon Sep 17 00:00:00 2001 From: Michal S Date: Tue, 23 Aug 2022 19:37:37 +0100 Subject: [PATCH] uwu search output --- PKGBUILD | 2 +- src/main.rs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index ca18187..18492dd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,7 +11,7 @@ url="https://github.com/crystal-linux/amethyst" license=('GPL3') source=("git+$url") sha256sums=('SKIP') -depends=('git' 'binutils' 'fakeroot' 'pacman-contrib' 'vim' 'expac') +depends=('git' 'binutils' 'fakeroot' 'pacman-contrib' 'vim' 'expac' 'less') makedepends=('cargo') conflicts=('ame') diff --git a/src/main.rs b/src/main.rs index 3cb850c..dd75fea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,7 +188,13 @@ fn cmd_search(args: &SearchArgs, options: Options) { let results = repo_results + "\n" + &aur_results; // Print results either way, so that the user can see the results after they exit `less` - println!("{}", results.trim()); + let text = if internal::uwu_enabled() { + uwu!(results.trim()) + } else { + results.trim().to_string() + }; + + println!("{}", text); // Check if results are longer than terminal height if results.lines().count() > crossterm::terminal::size().unwrap().1 as usize {