mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
The site search prefix now checks for an actual URL (with the isurl sub).
Searching for multiple terms with the site specified is now possible.
This commit is contained in:
parent
638cce2d19
commit
8399b2caf2
@ -1032,7 +1032,12 @@ given, use the current one.
|
||||
# Google site search
|
||||
if ($url =~ '^ss(| .*)$')
|
||||
{
|
||||
my ($site, $search) = $url =~ /^ss\s(.*)\s(.*)/;
|
||||
my ($site, $search) = $url =~ /^ss\s(\S+)\s(.*)/;
|
||||
if (isurl($site) =~ 'false')
|
||||
{
|
||||
$search = $site . $search if $site;
|
||||
$site = undef;
|
||||
}
|
||||
unless ($site and $search)
|
||||
{
|
||||
($search) = $url =~ /^ss\s(.*)/;
|
||||
@ -1378,6 +1383,7 @@ Russ Rowan, Petr Baudis
|
||||
sub isurl
|
||||
{
|
||||
my ($url) = @_;
|
||||
return 'false' if not $url;
|
||||
opendir(DIR, '.');
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
|
Loading…
Reference in New Issue
Block a user