search web for highlighted text feature? #13891

Closed
opened 2026-01-31 03:55:01 +00:00 by claunia · 5 comments
Owner

Originally created by @junefranklin on GitHub (May 25, 2021).

would be nice to highlight some terminal output and right click -> search in browser and it would just send whatever you highlighted to your default web browser.

would also be nice to have a "search stackoverflow" function, I was using google colab and when you get an error in that, it gives you a button that offers to search stackoverflow for you. might be nice to have a thing that detects text in your terminal looking like it might be an error message and offering the user a button to search web for that text. picture attached is what that looks like on colab.

image

so that button sends you here..
image

pretty simple little tool, but makes a world of difference.

Description of the new feature/enhancement

Proposed technical implementation details (optional)

Originally created by @junefranklin on GitHub (May 25, 2021). would be nice to highlight some terminal output and right click -> search in browser and it would just send whatever you highlighted to your default web browser. would also be nice to have a "search stackoverflow" function, I was using google colab and when you get an error in that, it gives you a button that offers to search stackoverflow for you. might be nice to have a thing that detects text in your terminal looking like it might be an error message and offering the user a button to search web for that text. picture attached is what that looks like on colab. ![image](https://user-images.githubusercontent.com/57028307/119467928-5807af80-bd89-11eb-807c-b9c2bdef3df0.png) so that button sends you here.. ![image](https://user-images.githubusercontent.com/57028307/119468439-cb112600-bd89-11eb-940c-310454ad2144.png) pretty simple little tool, but makes a world of difference. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@zadjii-msft commented on GitHub (May 25, 2021):

This is a neat idea for an extension, thanks!

@zadjii-msft commented on GitHub (May 25, 2021): This is a neat idea for an extension, thanks!
Author
Owner

@zadjii-msft commented on GitHub (Mar 22, 2022):

Note

Walkthrough

Start with this branch: https://github.com/microsoft/terminal/compare/dev/migrie/fhl/10175-web-search-for-text

Anyone coming to this thread: Taking the above commit, it should be fairly trivial to get this across the finish line.

  • The TODO! in ActionArgs.h should just be removed
  • The TODO! in TerminalPage::_HandleSearchForText might be tricker - should we join the lines with spaces? How does this interact with wrapped lines? Block selection? Basically, if you have answers there, that's good enough.
@zadjii-msft commented on GitHub (Mar 22, 2022): > **Note** > ## Walkthrough Start with this branch: https://github.com/microsoft/terminal/compare/dev/migrie/fhl/10175-web-search-for-text Anyone coming to this thread: Taking the above commit, it should be fairly trivial to get this across the finish line. * The TODO! in `ActionArgs.h` should just be removed * The TODO! in `TerminalPage::_HandleSearchForText` might be tricker - should we join the lines with spaces? How does this interact with wrapped lines? Block selection? Basically, if you have answers there, that's good enough.
Author
Owner

@BenConstable9 commented on GitHub (Oct 19, 2022):

  • The TODO! in TerminalPage::_HandleSearchForText might be tricker - should we join the lines with spaces? How does this interact with wrapped lines? Block selection? Basically, if you have answers there, that's good enough.

Could I just trim spaces from the end of each line and join with a single space? That way all wrapped lines would unwrap and block selection.

@BenConstable9 commented on GitHub (Oct 19, 2022): > * The TODO! in `TerminalPage::_HandleSearchForText` might be tricker - should we join the lines with spaces? How does this interact with wrapped lines? Block selection? Basically, if you have answers there, that's good enough. Could I just trim spaces from the end of each line and join with a single space? That way all wrapped lines would unwrap and block selection.
Author
Owner

@zadjii-msft commented on GitHub (Nov 3, 2022):

Could I just trim spaces from the end of each line and join with a single space? That way all wrapped lines would unwrap and block selection

That seems like a sensible default to me! Dunno why I never thought of that 😅

@zadjii-msft commented on GitHub (Nov 3, 2022): > Could I just trim spaces from the end of each line and join with a single space? That way all wrapped lines would unwrap and block selection That seems like a sensible default to me! Dunno why I never thought of that 😅
Author
Owner

@mpela81 commented on GitHub (Jun 11, 2023):

Made a PR, let's see how it goes 😄

@mpela81 commented on GitHub (Jun 11, 2023): Made a PR, let's see how it goes 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13891