This commit is contained in:
MangoPig
2026-07-17 00:36:54 +01:00
parent d79cb9a62b
commit eee302a4e0
10 changed files with 160 additions and 60 deletions
+21
View File
@@ -213,12 +213,30 @@ fi
export HISTORY_SUBSTRING_SEARCH_PREFIXED=1
zmodload zsh/terminfo 2>/dev/null || true
dotzsh_bind_if_present() {
local sequence="$1"
local widget="$2"
[ -n "$sequence" ] || return 0
bindkey "$sequence" "$widget"
}
# History keybindings
bindkey '^[[A' history-substring-search-up
bindkey '^[OA' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^[OB' history-substring-search-down
# Word movement keybindings
dotzsh_bind_if_present "${terminfo[kLFT5]:-}" backward-word
dotzsh_bind_if_present "${terminfo[kRIT5]:-}" forward-word
bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word
bindkey '^[[5D' backward-word
bindkey '^[[5C' forward-word
# bun
export BUN_INSTALL="$PROG_DIR/node/bun"
case ":$PATH:" in
@@ -233,3 +251,6 @@ case ":$PATH:" in
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# Allow Comments
setopt INTERACTIVE_COMMENTS