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

Open
opened 2026-01-31 02:46:53 +00:00 by claunia · 0 comments
Owner

Originally created by @brunzefb on GitHub (Nov 14, 2020).

Originally assigned to: @brunzefb on GitHub.

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.

Originally created by @brunzefb on GitHub (Nov 14, 2020). Originally assigned to: @brunzefb on GitHub. # 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 ```sh 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11410