mirror of
https://github.com/theniceboy/.config.git
synced 2026-07-16 22:01:21 +08:00
26 lines
466 B
Bash
26 lines
466 B
Bash
function zle_eval {
|
|
echo -en "\e[2K\r"
|
|
eval "$@"
|
|
zle redisplay
|
|
}
|
|
|
|
function openlazygit {
|
|
zle_eval lazygit
|
|
}
|
|
|
|
zle -N openlazygit; bindkey "^G" openlazygit
|
|
|
|
function openlazynpm {
|
|
zle_eval lazynpm
|
|
}
|
|
|
|
zle -N openlazynpm; bindkey "^N" openlazynpm
|
|
|
|
autoload -Uz add-zsh-hook
|
|
_rebind_custom_keys() {
|
|
bindkey '^p' fzf-find-widget
|
|
bindkey '^n' openlazynpm
|
|
add-zsh-hook -d precmd _rebind_custom_keys
|
|
}
|
|
add-zsh-hook precmd _rebind_custom_keys
|
|
|