summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-07-25 03:34:11 +0200
committerDan McGee <dan@archlinux.org>2008-07-25 05:16:28 +0200
commit5078ca580e102c0f87daee6bb82df1c0f0496bd3 (patch)
tree380f062be691da384fa739d5906c7c5de52d04a5 /contrib
parent310b13a4b7da1a35e035ce39f47091c0d3877cd5 (diff)
downloadpacman-5078ca580e102c0f87daee6bb82df1c0f0496bd3.tar.gz
pacman-5078ca580e102c0f87daee6bb82df1c0f0496bd3.tar.xz
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/pacsearch4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pacsearch b/contrib/pacsearch
index 3cf8b925..c9be7594 100755
--- a/contrib/pacsearch
+++ b/contrib/pacsearch
@@ -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