Skip to content

Search behavior in Terminal -- add capability to insert the matched hit #8274

@brunzefb

Description

@brunzefb

Allow Search functionality to easily expand found text, and insert the expanded found text at current cursor location

as an example take a look at this Kubernetes example:

╭─root@nonprod /home/nonprod
╰─# k get po -n dev | grep notifications
oom-ent-notifications-1-0-775c6fb9dc-n476x                1/1     Running   3          71d
╭─root@nonprod /home/nonprod
╰─#

The system listed a container name - a complex generated name. I need the full container name to delete the container, for instance, what I want is to execute the following

k delete po -n dev oom-ent-notifications-1-0-775c6fb9dc-n476x

Now the problem is -- how do I get the long name in? The mac iterm2 solves this by allowing a search

  1. User hits ctrl+f (or ctrl+shift+f)
  2. User types in oom-ent
  3. System matches oom-ent (below the line ending in grep notifications)
  4. User presses Tab
  5. System highlights oom-ent-notifications-1-0-775c6fb9dc-n476x AND copies it to clipboard
  6. User types k delete po -n dev [Ctrl+V]
  7. System displays k delete po -n dev oom-ent-notifications-1-0-775c6fb9dc-n476x
  8. User hits enter to execute the command.
    Shift-Tab should work to select up to the beginning of the word. Shift-Tab followed by Tab should select the whole word if letters in the middle of the word are matched.

Allowing this functionality is super-useful.
F.

Metadata

Metadata

Assignees

Labels

Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions