Prefixes
From Searchbastard
Contents |
What is a prefix?
Prefixes can be used to alter a Selection search or an Addressbar search. A prefix is defined by its name, type and action. Typing the name of a prefix before typing an alias will trigger the action of the prefix.
Example:
Lets say you have a prefix called "-" which is of type: Engine. The action of the prefix is "Open in new tab (background)". Lets also say you have an engine with the alias "wik". Selecting a word and typing "-wik" triggers the "-" prefix, because "wik" is an alias of an engine. The result is that the search is opened in a new unfocused tab. Entering "-wik test" in the addressbar also opens a search in a new unfocussed tab.
A couple of default prefixes are defined (for both engines and groups)
- . opens in current tab
- , opens in a new tab
- - opens in a new tab (background)
- | opens in sidebar (right)
There is some intuitive mnemonic meaning behind the symbols:
- . has a special meaning in directory systems: It means the current directory
- , comma: something new is comming
- - has a meaning of inactivity. The teachers writes "-" in her little book if a student didn't show up
- | is vertical, like the sidebar
Note however that these defaults can be changed/removed: Its just some suggestions. If something makes more sence to you, or is faster to type, feel free to change them. You could for example change them to "bg", "tab", "pg" and "sb". Note however that using ordernary letters increases the risk for prefix/alias clashing. If you for example have a prefix called "bg" and an alias called "b", the "bg" prefix would be useless in Selection search, because the "b" alias is matched before you can type "bg".
Editing a prefix
Select a row in the list and click "Edit" to change settings for the prefix.
An "Edit prefix" dialog opens:
Prefix
Name of the prefix
Type
- Group
- Engine
Prefix and Type together forms the condition.
Example:
You define a prefix called "test" with the type: "Group". You have a group with the alias "fav" and you have an engine with the alias "wik". If you select a word an type "testwik" nothing will happen, because "wik" is not a group. If you on the other hand type "testfav", the action of the prefix is triggered. If you also want the "test" prefix to work for engines, you must create a new prefix with the name "test" and type set to "Engine".
Action
For engine:
- Search
For group:
- Search
- Multisearch (primary)
- Multisearch (secondary)
- Multisearch (multisearch-frames)
- Multisearch (multisearch-tabs)
Target
- in current tab
- in new tab
- in new tab (background)
- in sidebar (right)
- in webpanel
- in new window
- in dialog
When type is "group", and action is "Search", the options are:
- in tabs
- in tabs in new window
Adding a prefix
Click "Add" and a dialog similar to the Edit prefix dialog opens
Removing a prefix
Simply select a prefix and click the "Remove" button


