zsh:keys: Bind ^G to fuzzy shcwd

This commit is contained in:
2023-02-22 21:59:03 +01:00
parent 51a2ab77d7
commit 86c3c1992a

View File

@@ -201,6 +201,15 @@ zle -N cmd-on-enter
bindkey "^M" cmd-on-enter
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(cmd-on-enter)
# Fuzzy PWD selector of all open shells
function go-shcwd {
dir="$(shcwd | fzf)"
[[ -z $dir ]] || pushd -q "$dir"
redraw-prompt
}
zle -N go-shcwd
bindkey '^G' go-shcwd
## History
# Ctrl-Up
bindkey '^[[1;5A' fzf-history-widget