Filters are used in Gex to limit display of file lists' and to manipulate selections.
Filters may be either regular expressions or shell wildcard matching, case sensitive or insensitive. Custom filter may be set for each view, or filters may be shared so change in one view affects other views. Filter settings may be saved in config file in ListLayout section and restored when Gex is restarted later. You can put FilterEntry item on toolbar. It is a text entry where you can enter your custom filtering expression.
Bug: you must press enter while cursor is in this entry to activate the filter even if you choose pattern from the combo list.
You may define unlimited amount of filter templates and load them any time you need a custom filter. Filter templates are stored in your config file.
Each file list has its own set of switches and custom filter. Switches are:
- View/Use Filter
If active then custom filter is used (if one is defined).
- View/Show Hidden Files
Show files which names start with '.'.
- View/Show Folders
Show folders on file list.
- Edit Filter Pattern...
This is an alternative method for changing filtering pattern and actually the only one if you haven't FilterEntry on toolbar.
- Use Regular Expression
Filter pattern is a regular expression. This is slightly more difficult to use for beginner, but much more powerful than simple wildcard matching.
- Use Wildcard Matching
Filter pattern works in exactly the same way as patterns in shell commands, ie. `ls'. See 'Wildcard Matching' later in this document.
- Case Sensitive Filter
If this option is turned on the filter is case sensitive. Otherwise it is not :)
- Allow Hidden Files
This is only supported when using wildcard matching. Turning this option on orders the filter to treat all regular and hidden files in the same way (that means that hidden files are not filtered out if they match the pattern). Note that even if you turn this option on, but keep 'Show Hidden Files' off in the list view settings hidden files will NOT be displayed.
- Disable All Filters
Turns all filters off in all file list views. This affects the 'Use Filter' switch and doesn't erase any filtering patterns.
- Enable All Filters
Turns all filters on in all file list view. This affects the 'Use Filter' switch only, so if some view has no filter defined this does nothing.
- Copy Current Filter
Copy filter from current view to all other views. 'Use Filter' switch is also turned on in all views. This does NOT make this filter shared between views.
- Share Current Filter
Like copy option above, but make this filter shared. This means that when you change any setting (pattern, type, etc.) this change is propagated to all views sharing this filter.
- Separate Current Filter
This option "detaches" current filter from shared mode. If current filter is not shared this does nothing. After separating filter changes no longer are propagated to other views. Other instances of this filter in other views stay in shared mode. This menu item is only sensitive if current filter is really shared.
- Load Filter Preset
Loads filter from a named template.
- Create Preset...
Create new named filter template using current filtering settings.
- Edit Presets...
Opens a simple preset editor dialog.
Gex supports POSIX regular expressions. There are plenty of manuals and other sources where you can read about them. For example:
man 7 regex
Both simple and extended patterns introduced in `ksh' are supported. The patterns are written in the form explained in the following table where PATTERN-LIST is a `|' separated list of patterns:
The pattern matches if zero or one occurrences of any of the patterns in the PATTERN-LIST allow matching the input string.
The pattern matches if zero or more occurrences of any of the patterns in the PATTERN-LIST allow matching the input string.
The pattern matches if one or more occurrences of any of the patterns in the PATTERN-LIST allow matching the input string.
The pattern matches if exactly one occurrence of any of the patterns in the PATTERN-LIST allows matching the input string.
The pattern matches if the input string cannot be matched with any of the patterns in the PATTERN-LIST.
Note: this is a copy/paste from libc info.
Project Gex, started by Jarek Dukat, 2002