Re: Keystroke to search via search engine

Tim Chase <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <YxdwANzJItH/[email protected]>
[resending, this time to the list rather than directly to the OP]
On 2022-09-06 08:41, Saniya Maheshwari wrote:                                                                                                                                                                                 
> only way to search using a search engine in Lynx, is to type out                                                                                                                                                            
> the URL of the search engine, let that page load, and then type                                                                                                                                                             
> in the search string in the search box. Is there already a simpler                                                                                                                                                          
> way to do this, that I have missed?                                                                                                                                                                                         

I usually do this with an alias or shell function to populate the                                                                                                                                                             
GET parameters, like                                                                                                                                                                                                          

  $ goog() { lynx [2]https://google.com/search?q="$1" ; }                                                                                                                                                                     
  $ ddg() { lynx [3]https://duckduckgo.com/lite/?q="$1" ; }                                                                                                                                                                   
  $ bing() { lynx [4]https://www.bing.com/search?q="$1" ; }                                                                                                                                                                  )

and then when I'm at the command-line, I can type                                                                                                                                                                             

  $ goog "kittens and puppies"                                                                                                                                                                                               )

to have lynx jump directly to those search results.  I'm not aware                                                                                                                                                           )
of any functionality within lynx to use a hot-key, have it prompt                                                                                                                                                             
for GET-parameter data, and then populate a placeholder in a URL                                                                                                                                                              
(similar to Firefox keyword searches).                                                                                                                                                                                        

-tkc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.