| Copyright | Copyright (c) 2021-2023 Travis Cardwell |
|---|---|
| License | MIT |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
BM
Description
Synopsis
- version :: String
- type Argument = String
- type Command = FilePath
- type Error = String
- type Keyword = String
- type ParameterName = String
- type ParameterValue = String
- type Trace = String
- type Url = String
- data Config = Config {
- configCommand :: !Command
- configArgs :: !(Vector Bookmark)
- data Bookmark = Bookmark {}
- data Query = Query {
- action :: !Url
- parameter :: !ParameterName
- hiddenParameters :: !(Vector Parameter)
- data Parameter = Parameter {
- name :: !ParameterName
- value :: !ParameterValue
- data Proc = Proc {}
- run :: Config -> [Argument] -> (Either Error Proc, [Trace])
- getCompletion :: Config -> [Argument] -> [Argument]
Constants
Types
type Command = FilePath Source #
Process command
This command is executed with a single URL argument to open a bookmark/query.
Since: 0.1.0.0
type Keyword = String Source #
Bookmark keyword
The configuration file defines a hierarchy of keywords that are matched against CLI arguments to determine which bookmark/query to open.
Since: 0.1.0.0
type ParameterName = String Source #
Query parameter name
Since: 0.1.0.0
type ParameterValue = String Source #
Query parameter value
Since: 0.1.0.0
Configuration
YAML attributes:
command: top-level command (string, default depends on the OS)args: bookmarks (array ofBookmark)
Default commands:
- Linux:
xdg-open - Windows:
start - macOS:
open
Since: 0.1.0.0
Constructors
| Config | |
Fields
| |
Bookmark definition
YAML attributes:
keyword: bookmark keyword (string)command: command for this bookmark and children (string, optional)url: bookmark URL (string, optional)query: bookmark query definition (Query, optional)args: child bookmarks (array ofBookmark, optional)
A command be set to override the top-level command, but this is generally
not done. If a bookmark is selected and there is no URL, the first child
is processed. Only one of query and args may be present.
Since: 0.1.0.0
Constructors
| Bookmark | |
Query definition
YAML attributes:
action: URL (string)parameter: query parameter name (string, default:q)hidden: array of constant parameters (Parameter)
Since: 0.1.0.0
HTTP GET parameter definition
YAML attributes:
name: parameter namevalue: constant parameter value
Since: 0.1.0.0
Constructors
| Parameter | |
Fields
| |
Process specification
Since: 0.1.0.0