pacsearch: quote args passed to pacman

Something such as "pacsearch foo|bar" would cause problems due to the
quoting being dropped. Adding quotes solves the problem.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-07-24 20:34:11 -05:00
parent 310b13a4b7
commit 5078ca580e
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ sub to_color {
my %allpkgs = ();
my $syncout = `pacman -Ss @ARGV`;
my $syncout = `pacman -Ss '@ARGV'`;
# split each sync search entry into its own array entry
my @syncpkgs = split(/\n^(?=\w)/m, $syncout);
# remove the extra \n from the last desc entry
@ -93,7 +93,7 @@ foreach $_ (@syncpkgs) {
$allpkgs{$pkgfields[1]} = [ @pkgfields ];
}
my $queryout = `pacman -Qs @ARGV`;
my $queryout = `pacman -Qs '@ARGV'`;
# split each querysearch entry into its own array entry
my @querypkgs = split(/\n^(?=\w)/m, $queryout);
# remove the extra \n from the last desc entry