The Search function in any utility allows you to find information related to a keyword entered as a query. It can also be used to find the path of an application or a program you run on your system. Windows Terminal too comes with a search feature that allows you to look through the text buffer for a specific keyword. Let’s see how to search in Windows Terminal in Windows 11/10.
How to search in Windows Terminal
The Search in Windows Terminal can be useful when trying to find a command you had run before or for a specific file name. Here are a few different ways in which you can use Search function in Windows Terminal.
- Keyboard shortcut use
- Directional search
- Searching within panes
- Case match search.
1] Keyboard Shortcut use
The simplest way to access the Search function in Windows Terminal is to use the Ctrl+Shift+F keyboard shortcut. Once opened, you can type the keyword you’re looking for into the text box and hit Enter to search.
You can also open the search dialog with a customized shortcut of your own. To do so, open your settings.json file and search for the find command. By default, this command is set to Ctrl+Shift+F.
// Press ctrl+shift+f to open the search box { "command": "find", "keys": "ctrl+shift+f" },
You can change it to something simple as just Ctrl+F.
2] Directional Search
This method will configure Windows Terminal to search from the bottom to the top of the text buffer.
If required, you can change the search direction (upwards or downwards) by selecting one of the arrows in the search dialog.
3] Searching within panes
The search dialog integrates with panes as well. When focused on a pane, you can open the search dialog.
It is visible in the upper-right corner of a pane. Any keyword you enter will show results found within that pane only.
4] Case match search
As opposed to other methods, you can add case matching as an option in your search to narrow down your search results. Simply toggle the case matching by selecting the case match button. Now, whenever you perform the search, only those results that match the keyword entered with its specific letter casing will appear.
How do you search in Terminal commands history?
When inside a terminal, hold down Ctrl and press R. This action invokes reverse-i-search. Now, enter a letter – like W to find a match for the most recent command in your history that starts with the same alphabet. Keep typing to narrow down your match. When found, press Enter.