1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

fix(zsh): backspace was mapped to delete word by mistake

This commit is contained in:
oddlama 2023-09-04 16:17:21 +02:00
parent 406fedf637
commit 3358f2798f
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 11 additions and 11 deletions

View file

@ -19,16 +19,16 @@
unset HISTFILE
'')
(lib.mkAfter (''
function atuin-prefix-search() {
local out
if out=$(${pkgs.sqlite}/bin/sqlite3 -readonly ~/.local/share/atuin/history.db \
'SELECT command FROM history WHERE command LIKE cast('"x'$(str_to_hex "$_atuin_search_prefix")'"' as text) || "%" ORDER BY timestamp DESC LIMIT 1 OFFSET '"$_atuin_search_offset"); then
[[ -z "$out" ]] && return 1
BUFFER=$out
else
return 1
fi
}; zle -N atuin-prefix-search
function atuin-prefix-search() {
local out
if out=$(${pkgs.sqlite}/bin/sqlite3 -readonly ~/.local/share/atuin/history.db \
'SELECT command FROM history WHERE command LIKE cast('"x'$(str_to_hex "$_atuin_search_prefix")'"' as text) || "%" ORDER BY timestamp DESC LIMIT 1 OFFSET '"$_atuin_search_offset"); then
[[ -z "$out" ]] && return 1
BUFFER=$out
else
return 1
fi
}; zle -N atuin-prefix-search
''
+ lib.readFile ./zshrc))
];

View file

@ -84,7 +84,7 @@ function setup_keybinds() {
local keys_Backspace=( "${terminfo[kbs]}" '^?')
local keys_CtrlBackspace=( "${terminfo[cub1]}" '^H')
local keys_AltBackspace=( "${terminfo[kbs]}" '\e^?')
local keys_AltBackspace=( '\e^?')
local keys_Delete=( "${terminfo[kdch1]}" '\e[3~' )
local keys_ShiftDelete=( "${terminfo[kDC]}" '\e[3;2~' )