Add atuin to nushell

This commit is contained in:
muon 2026-03-08 15:31:23 +00:00
parent 5e84e6aba8
commit 5518f1ca35
2 changed files with 37 additions and 28 deletions

View file

@ -23,35 +23,43 @@ in {
shellAliases = aliases; shellAliases = aliases;
# vi mode + sensible defaults # vi mode + sensible defaults via flat assignments (avoids clobbering other modules)
extraConfig = '' settings = {
$env.config = { show_banner = false;
show_banner: false edit_mode = "vi";
edit_mode: vi cursor_shape = {
vi_insert = "line";
vi_normal = "block";
};
history = {
max_size = 2097152;
sync_on_enter = true;
file_format = "sqlite";
isolation = false;
};
completions = {
case_sensitive = false;
quick = true;
partial = true;
algorithm = "fuzzy";
};
table.mode = "rounded";
};
cursor_shape: { # Append the / keybinding after all integrations (including atuin) are sourced,
vi_insert: line # so _atuin_search_cmd is defined when this runs.
vi_normal: block extraConfig = lib.mkAfter ''
} $env.config = (
$env.config | upsert keybindings (
history: { $env.config.keybindings | append {
max_size: 2097152 name: atuin_search_vi_normal
sync_on_enter: true modifier: none
file_format: "sqlite" keycode: char_/
isolation: false mode: vi_normal
} event: { send: executehostcommand cmd: (_atuin_search_cmd) }
completions: {
case_sensitive: false
quick: true
partial: true
algorithm: "fuzzy"
}
table: {
mode: rounded
}
} }
)
)
''; '';
# Carry over zsh session variables # Carry over zsh session variables

View file

@ -42,6 +42,7 @@ in
atuin = { atuin = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
enableNushellIntegration = true;
flags = ["--disable-up-arrow"]; flags = ["--disable-up-arrow"];
settings = { settings = {
sync_frequency = "5m"; sync_frequency = "5m";