====== Using Search ====== This document gives an overview of how to use the search function in Worker. ===== Introduction ===== {{ :worker:doc:worker-search.png?307x284|:worker:doc:worker-search.png}} In Worker 2.14.0 a new search command is available. Basically it can do the usual stuff. You can enter any start directory, enter a file pattern to match names with and optionally search the content of files. __**Features:**__ * Stored results\\ All search results will be stored even if the search window is closed. You can open the search window later and access previous results without searching again.\\ If you want to get rid of all previous results you can click on the button **"Clear store"**. * Search refinement\\ It's possible to refine a search result. Whenever search results are available, any further search with different parameters will only consider these results. The text field for the start directory will be invisible in this case.\\ Using the button **"Start new search"** you can start a completely new search, the search results will be cleared and the text field for the start directory will become visible again. * Search inside archives\\ Searches can be started directly within an archive, there's no need to decompress an archive. It's even possible to search in other archives stored in archives, like a zip file inside a tar.gz archive. __**Tips:**__ * Pressing in any of the text fields directly jumps to the next field. Pressing in the text field about file content will automatically start the search. Pressing Ctrl+ will immediately start the search. * You can configure the search command to show the previous result when you start the command. This makes it easy to come back and browse the results again even if you did some file management in the meantime. ===== Search parameters ===== {{ :worker:doc:search-parameters.png?307x59}} The top area of the search window contains the search parameters. Most of them should be fairly descriptive but here are some details: - Start directory\\ You can enter a single dot or leave it empty if you want to start the search in the current directory.\\ The text field is invisible if search results are available which will be used for further results. - File name\\ Using the default settings you can enter shell-like patterns using an asterisk as a placeholder for an arbitrary string. You can select the option **"Use regular expression"** if you want to use regular expressions for more sophisticated patterns.\\ You can also choose to match the complete file name including the path by selecting the corresponding option. - File content\\ If not empty the search also checks the content of the files accordingly the regular expression entered here. The list of results will then also contain the exact line number in which the entered string was found. - Follow symlinks\\ When selected the search will also enter symlinked directories when walking through the directory tree. - Search content of archives too\\ This option enables the search to look inside archives just as they were directories.\\ **Note:** This can be significantly slower since every archive in any sub-directory will be opened. If the start directory is a remote directory this means that archives will be downloaded even if the search doesn't involve content matching. ===== Search results ===== {{ :worker:doc:search-results.png?307x126}} Below the search parameters you can find the list of results. The complete file name is listed and, if the file content was checked, the line number.\\ There are buttons available for manipulating the results. - Change directory to entry\\ By clicking on this button you can immediately close the search window and the selected result will be highlighted in the active list view inside Worker.\\ You can also double click on a result or press enter to do the same. - View\\ The active entry will be opened in the internal file viewer directly jumping to the corresponding line number, if any. - Edit\\ The edit command will be used to edit the active entry in an external editor. The command can be configured in the configuration of the search command. - Remove selected results from list\\ As the available results will be used for further results you can removed some entries from the list so these files won't be considered for search refinement. ===== Result store ===== {{ :worker:doc:search-store.png?307x63}} You can select old results from the bottom list. The list of results will be updated just as the corresponding search parameters. You can also refine an older search by first selecting it and modify the search parameters and start the search again.