diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/docs/config/config.md | 156 |
1 files changed, 87 insertions, 69 deletions
diff --git a/docs/docs/config/config.md b/docs/docs/config/config.md index ba3e2bc7..c3729ec3 100644 --- a/docs/docs/config/config.md +++ b/docs/docs/config/config.md @@ -21,6 +21,33 @@ is what you care about. See [config.toml](../../../atuin-client/config.toml) for an example +### `db_path` + +The path to the Atuin SQlite database. Defaults to +`~/.local/share/atuin/history.db`. + +``` +db_path = "~/.history.db" +``` + +### `key_path` + +The path to the Atuin encryption key. Defaults to +`~/.local/share/atuin/key`. + +``` +key = "~/.atuin-key" +``` + +### `session_path` + +The path to the Atuin server session file. Defaults to +`~/.local/share/atuin/session`. This is essentially just an API token + +``` +key = "~/.atuin-session" +``` + ### `dialect` This configures how the [stats](../commands/stats.md) command parses dates. It has two @@ -76,40 +103,68 @@ rate limit, which won't cause any issues. sync_frequency = "1h" ``` -### `db_path` +### `search_mode` -The path to the Atuin SQlite database. Defaults to -`~/.local/share/atuin/history.db`. +Which search mode to use. Atuin supports "prefix", "fulltext", "fuzzy", and +"skim" search modes. -``` -db_path = "~/.history.db" -``` +Prefix mode searches for "query\*"; fulltext mode searches for "\*query\*"; +"fuzzy" applies the [fuzzy search syntax](#fuzzy-search-syntax); +"skim" applies the [skim search syntax](https://github.com/lotabout/skim#search-syntax). -### `key_path` +Defaults to "fuzzy". -The path to the Atuin encryption key. Defaults to -`~/.local/share/atuin/key`. +#### `fuzzy` search syntax + +The "fuzzy" search syntax is based on the +[fzf search syntax](https://github.com/junegunn/fzf#search-syntax). + +| Token | Match type | Description | +|-----------|----------------------------|--------------------------------------| +| `sbtrkt` | fuzzy-match | Items that match `sbtrkt` | +| `'wild` | exact-match (quoted) | Items that include `wild` | +| `^music` | prefix-exact-match | Items that start with `music` | +| `.mp3$` | suffix-exact-match | Items that end with `.mp3` | +| `!fire` | inverse-exact-match | Items that do not include `fire` | +| `!^music` | inverse-prefix-exact-match | Items that do not start with `music` | +| `!.mp3$` | inverse-suffix-exact-match | Items that do not end with `.mp3` | + +A single bar character term acts as an OR operator. For example, the following +query matches entries that start with `core` and end with either `go`, `rb`, +or `py`. ``` -key = "~/.atuin-key" +^core go$ | rb$ | py$ ``` -### `session_path` +### `filter_mode` -The path to the Atuin server session file. Defaults to -`~/.local/share/atuin/session`. This is essentially just an API token +The default filter to use when searching + +| Column1 | Column2 | +|------------------|--------------------------------------------------------------| +| global (default) | Search history from all hosts, all sessions, all directories | +| host | Search history just from this host | +| session | Search history just from the current session | +| directory | Search history just from the current directory | + +Filter modes can still be toggled via ctrl-r ``` -key = "~/.atuin-session" +filter_mode = "host" ``` -### `search_mode` +### `filter_mode_shell_up_key_binding` -Which search mode to use. Atuin supports "prefix", fulltext and "fuzzy" search -modes. The prefix searches for "query\*", fulltext "\*query\*", and fuzzy applies -the search syntax [described below](#fuzzy-search-syntax). +The default filter to use when searching and being invoked from a shell up-key binding. -Defaults to "fuzzy" +Accepts exactly the same options as `filter_mode` above + +``` +filter_mode_shell_up_key_binding = "session" +``` + +Defaults to the value specified for filter_mode. ### `style` @@ -117,51 +172,37 @@ Which style to use. Possible values: `auto`, `full` and `compact`. - `compact`: - + - `full`: - + Defaults to `auto`. -### `filter_mode` - -The default filter to use when searching +### `inline_height` -| Column1 | Column2 | -|--------------- | --------------- | -| global (default) | Search history from all hosts, all sessions, all directories | -| host | Search history just from this host | -| session | Search history just from the current session | -| directory | Search history just from the current directory| +Set the maximum number of lines Atuin's interface should take up. -Filter modes can still be toggled via ctrl-r + +If set to `0` (default), Atuin will always take up as many lines as available (full screen). -``` -filter_mode = "host" -``` +### `show_preview` -### `filter_mode_shell_up_key_binding` +Configure whether or not to show a preview of the selected command. -The default filter to use when searching and being invoked from a shell up-key binding. + -Accepts exactly the same options as `filter_mode` above - -``` -filter_mode_shell_up_key_binding = "session" -``` - -Defaults to the value specified for filter_mode. +Useful when the command is longer than the terminal width and is cut off. ### `exit_mode` What to do when the escape key is pressed when searching -| Value | Behaviour | -|------------------------- | --------------- | -| return-original (default) | Set the command-line to the value it had before starting search | +| Value | Behaviour | +|---------------------------|------------------------------------------------------------------| +| return-original (default) | Set the command-line to the value it had before starting search | | return-query | Set the command-line to the search query you have entered so far | Pressing ctrl+c or ctrl+d will always return the original command-line value. @@ -170,29 +211,6 @@ Pressing ctrl+c or ctrl+d will always return the original command-line value. exit_mode = "return-query" ``` -#### `fuzzy` search syntax - -The "fuzzy" search syntax is based on the -[fzf search syntax](https://github.com/junegunn/fzf#search-syntax). - -| Token | Match type | Description | -| --------- | -------------------------- | ------------------------------------ | -| `sbtrkt` | fuzzy-match | Items that match `sbtrkt` | -| `'wild` | exact-match (quoted) | Items that include `wild` | -| `^music` | prefix-exact-match | Items that start with `music` | -| `.mp3$` | suffix-exact-match | Items that end with `.mp3` | -| `!fire` | inverse-exact-match | Items that do not include `fire` | -| `!^music` | inverse-prefix-exact-match | Items that do not start with `music` | -| `!.mp3$` | inverse-suffix-exact-match | Items that do not end with `.mp3` | - -A single bar character term acts as an OR operator. For example, the following -query matches entries that start with `core` and end with either `go`, `rb`, -or `py`. - -``` -^core go$ | rb$ | py$ -``` - ### history_filter The history filter allows you to exclude commands from history tracking - maybe you want to keep ALL of your `curl` commands totally out of your shell history, or maybe just some matching a pattern. |
