Atuin: Difference between revisions
m typo |
add note on disabling up-arrow / Ctrl+R |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{wip|date=11 March 2025}} | ||
[https://atuin.sh/ Atuin] replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, Atuin (optionally) syncs your shell history between all of your machines. | [https://atuin.sh/ Atuin] replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, Atuin (optionally) syncs your shell history between all of your machines. | ||
| Line 20: | Line 20: | ||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
=== Disable up-arrow / Ctrl+R keybindings === | |||
Key bindings are not part of Atuin settings and need to be passed as flags instead.{{file|~/.config/home-manager/home.nix|nix|<nowiki> | |||
{ pkgs, ... }: { | |||
programs.atuin = { | |||
enable = true; | |||
# ... | |||
flags = [ "--disable-up-arrow" ]; # or --disable-ctrl-r | |||
}; | |||
}; | |||
</nowiki>|name=~/.config/home-manager/home.nix|lang=nix}} | |||
=== Enable synchronization with atuin.sh === | === Enable synchronization with atuin.sh === | ||
| Line 25: | Line 36: | ||
==== Imperatively ==== | ==== Imperatively ==== | ||
To synchronize your history with atuin.sh you first need to register an account or login with the cli utility. Doing that will create a key and | To synchronize your history with atuin.sh you first need to register an account or login with the cli utility. Doing that will create a key and a session token in <code>~/.local/share/atuin</code> | ||
<syntaxHighlight lang="bash"> | <syntaxHighlight lang="bash"> | ||
| Line 60: | Line 71: | ||
=== zsh autosuggestions === | === zsh autosuggestions === | ||
If zsh autosuggestions is enabled, atuin automatically adds itself as the first autosuggestion strategy; | If zsh autosuggestions is enabled, atuin automatically adds itself as the first autosuggestion strategy; see [https://docs.atuin.sh/integrations/#zsh-autosuggestions atuin docs] | ||
{{file|~/.config/home-manager/home.nix|nix|<nowiki> | {{file|~/.config/home-manager/home.nix|nix|<nowiki> | ||
| Line 66: | Line 77: | ||
programs.zsh = { | programs.zsh = { | ||
enable = true; | enable = true; | ||
autosuggestion.enable = true; # Enable autosuggestions | |||
}; | }; | ||
programs.atuin = { | programs.atuin = { | ||