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:
parent
406fedf637
commit
3358f2798f
2 changed files with 11 additions and 11 deletions
|
@ -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))
|
||||
];
|
||||
|
|
|
@ -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~' )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue