2021-04-25 11:21:52 -06:00
|
|
|
# Config
|
|
|
|
|
|
|
|
Atuin maintains two configuration files, stored in `~/.config/atuin/`. We store
|
|
|
|
data in `~/.local/share/atuin` (unless overridden by XDG\_\*).
|
|
|
|
|
|
|
|
You can also change the path to the configuration directory by setting
|
|
|
|
`ATUIN_CONFIG_DIR`. For example
|
|
|
|
|
|
|
|
```
|
|
|
|
export ATUIN_CONFIG_DIR = /home/ellie/.atuin
|
|
|
|
```
|
|
|
|
|
|
|
|
## Client config
|
|
|
|
|
|
|
|
```
|
|
|
|
~/.config/atuin/config.toml
|
|
|
|
```
|
|
|
|
|
|
|
|
The client runs on a user's machine, and unless you're running a server, this
|
|
|
|
is what you care about.
|
|
|
|
|
|
|
|
See [config.toml](../atuin-client/config.toml) for an example
|
|
|
|
|
|
|
|
### `dialect`
|
|
|
|
|
|
|
|
This configures how the [stats](stats.md) command parses dates. It has two
|
|
|
|
possible values
|
|
|
|
|
|
|
|
```
|
|
|
|
dialect = "uk"
|
|
|
|
```
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
```
|
|
|
|
dialect = "us"
|
|
|
|
```
|
|
|
|
|
|
|
|
and defaults to "us".
|
|
|
|
|
|
|
|
### `auto_sync`
|
|
|
|
|
|
|
|
Configures whether or not to automatically sync, when logged in. Defaults to
|
|
|
|
true
|
|
|
|
|
|
|
|
```
|
|
|
|
auto_sync = true/false
|
|
|
|
```
|
|
|
|
|
2022-10-14 03:59:21 -06:00
|
|
|
### `update_check`
|
|
|
|
|
|
|
|
Configures whether or not to automatically check for updates. Defaults to
|
|
|
|
true.
|
|
|
|
|
|
|
|
```
|
2022-11-06 01:41:35 -06:00
|
|
|
update_check = true/false
|
2022-10-14 03:59:21 -06:00
|
|
|
```
|
|
|
|
|
2021-04-25 11:21:52 -06:00
|
|
|
### `sync_address`
|
|
|
|
|
|
|
|
The address of the server to sync with! Defaults to `https://api.atuin.sh`.
|
|
|
|
|
|
|
|
```
|
|
|
|
sync_address = "https://api.atuin.sh"
|
|
|
|
```
|
|
|
|
|
|
|
|
### `sync_frequency`
|
|
|
|
|
|
|
|
How often to automatically sync with the server. This can be given in a
|
2022-04-22 14:17:05 -06:00
|
|
|
"human-readable" format. For example, `10s`, `20m`, `1h`, etc. Defaults to `1h`.
|
2021-04-25 11:21:52 -06:00
|
|
|
|
|
|
|
If set to `0`, Atuin will sync after every command. Some servers may potentially
|
|
|
|
rate limit, which won't cause any issues.
|
|
|
|
|
|
|
|
```
|
|
|
|
sync_frequency = "1h"
|
|
|
|
```
|
|
|
|
|
|
|
|
### `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"
|
|
|
|
```
|
|
|
|
|
2021-05-10 14:28:07 -06:00
|
|
|
### `search_mode`
|
|
|
|
|
2022-10-07 21:36:49 -06:00
|
|
|
Which search mode to use. Atuin supports "prefix", fulltext and "fuzzy" search
|
2022-03-18 05:37:27 -06:00
|
|
|
modes. The prefix searches for "query\*", fulltext "\*query\*", and fuzzy applies
|
|
|
|
the search syntax [described below](#fuzzy-search-syntax).
|
2021-05-10 14:28:07 -06:00
|
|
|
|
|
|
|
Defaults to "prefix"
|
|
|
|
|
2022-10-05 06:14:56 -06:00
|
|
|
### `style`
|
|
|
|
|
|
|
|
Which style to use. Possible values: `auto`, `full` and `compact`.
|
|
|
|
|
|
|
|
- `compact`:
|
|
|
|
|
|
|
|
![image](https://user-images.githubusercontent.com/1710904/161623659-4fec047f-ea4b-471c-9581-861d2eb701a9.png)
|
|
|
|
|
|
|
|
- `full`:
|
|
|
|
|
|
|
|
![image](https://user-images.githubusercontent.com/1710904/161623547-42afbfa7-a3ef-4820-bacd-fcaf1e324969.png)
|
|
|
|
|
|
|
|
Defaults to `auto`.
|
|
|
|
|
2022-04-22 14:05:02 -06:00
|
|
|
### `filter_mode`
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2021-05-10 14:28:07 -06:00
|
|
|
```
|
2022-11-17 01:04:34 -07:00
|
|
|
filter_mode = "host"
|
2021-05-10 14:28:07 -06:00
|
|
|
```
|
|
|
|
|
2022-11-06 01:34:14 -06:00
|
|
|
### `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 |
|
|
|
|
| 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.
|
|
|
|
|
|
|
|
```
|
|
|
|
exit_mode = "return-query"
|
|
|
|
```
|
|
|
|
|
2022-03-18 05:37:27 -06:00
|
|
|
#### `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$
|
|
|
|
```
|
|
|
|
|
2021-04-25 11:21:52 -06:00
|
|
|
## Server config
|
|
|
|
|
|
|
|
`// TODO`
|