2021-02-13 05:55:53 -07:00
< h1 align = "center" >
A'tuin
< / h1 >
< blockquote align = "center" >
Through the fathomless deeps of space swims the star turtle Great A’ Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld.
< / blockquote >
2021-02-13 14:21:00 -07:00
A'tuin manages and synchronizes your shell history! Instead of storing
everything in a text file (such as ~/.history), A'tuin uses a sqlite database.
While being a little more complex, this allows for more functionality.
2021-02-13 13:21:49 -07:00
2021-02-13 14:21:00 -07:00
As well as the expected command, A'tuin stores
2021-02-13 13:21:49 -07:00
- duration
- exit code
- working directory
- hostname
- time
- a unique session ID
2021-02-13 13:54:35 -07:00
## Install
2021-02-13 14:21:00 -07:00
`atuin` needs a recent version of Rust + Cargo! It's best to use
[rustup ](https://rustup.rs/ ) for getting set up there.
2021-02-13 13:54:35 -07:00
```
cargo install atuin
```
2021-02-13 14:21:00 -07:00
Once the binary is installed, the shell plugin requires installing:
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
zplug:
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
```
zplug "ellie/atuin"
```
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
antigen:
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
```
antigen use https://github.com/ellie/atuin.git
```
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
oh-my-zsh:
2021-02-13 13:54:35 -07:00
2021-02-13 14:21:00 -07:00
```
git clone https://github.com/ellie/atuin ~/.oh-my-zsh/plugins/atuin
2021-02-13 13:54:35 -07:00
```
2021-02-13 14:21:00 -07:00
and then add `atuin` to your `plugins` list in `~/.zshrc`
2021-02-13 13:54:35 -07:00
## Usage
2021-02-13 15:06:27 -07:00
By default A'tuin will rebind ctrl-r to use fzf to fuzzy search your history. You
can specify a different fuzzy tool by changing the value of `ATUIN_FUZZY` :
```
export ATUIN_FUZZY=fzy
```
2021-02-13 13:54:35 -07:00
### Import history
```
atuin import auto # detect shell, then import
2021-02-13 15:06:27 -07:00
or
2021-02-13 13:54:35 -07:00
atuin import zsh # specify shell
```
### List history
```
atuin history list
```
2021-02-13 14:21:00 -07:00
## ...what's with the name?
A'tuin is named after "The Great A'tuin", a giant turtle from Terry Pratchett's
Discworld series of books.