3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-24 12:59:35 +01:00

applets/urban: sort by thumbs-up by default

This commit is contained in:
Pragmatic Software 2024-04-07 17:18:34 -07:00
parent a3ab27dbac
commit 24962935fa
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 3 additions and 8 deletions

9
applets/urban vendored
View File

@ -19,7 +19,7 @@ local $SIG{__WARN__} = sub {
chomp $getopt_error; chomp $getopt_error;
}; };
my $usage = "Usage: udict [-m <show definition matching this regex>] [-n <entry number>] [-s <up/down (sort by thumbs up/down)>] <phrase>\n"; my $usage = "Usage: udict [-a] [-m <show definition matching this regex>] [-n <entry number>] [-s <up/down (sort by thumbs up/down)>] <phrase>\n";
binmode(STDOUT, ":utf8"); binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8"); binmode(STDERR, ":utf8");
@ -71,12 +71,7 @@ sub sort_entries {
} }
} }
my @entries; my @entries = sort sort_entries @{ $results->definitions };
if (defined $sort) {
@entries = sort sort_entries @{ $results->definitions };
} else {
@entries = @{ $results->definitions };
}
my $num_entries = @entries; my $num_entries = @entries;
if ($num_entries == 0) { if ($num_entries == 0) {

View File

@ -134,7 +134,7 @@ https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-NET-x86_64-Snap
I recommend using OpenSUSE Tumbleweed since that's what I've tested on most recently. I recommend using OpenSUSE Tumbleweed since that's what I've tested on most recently.
## Create a new virtual machine ## Create a new virtual machine
To create a new virtual machines, this guide offers two options. The first is To create a new virtual machine, this guide offers two options. The first is
libvirt's `virt-install` command. It greatly simplifies configuration by libvirt's `virt-install` command. It greatly simplifies configuration by
automatically creating networking bridges and setting up virtio devices. The automatically creating networking bridges and setting up virtio devices. The
second option is manually using Linux system commands to configure network second option is manually using Linux system commands to configure network