diff options
Diffstat (limited to 'shell/key-bindings.zsh')
| -rw-r--r-- | shell/key-bindings.zsh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index a3699add..51aa6ea0 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -62,10 +62,12 @@ fzf-file-widget() { zle reset-prompt return $ret } -zle -N fzf-file-widget -bindkey -M emacs '^T' fzf-file-widget -bindkey -M vicmd '^T' fzf-file-widget -bindkey -M viins '^T' fzf-file-widget +if [[ "${FZF_CTRL_T_COMMAND-x}" != "" ]]; then + zle -N fzf-file-widget + bindkey -M emacs '^T' fzf-file-widget + bindkey -M vicmd '^T' fzf-file-widget + bindkey -M viins '^T' fzf-file-widget +fi # ALT-C - cd into the selected directory fzf-cd-widget() { @@ -83,10 +85,12 @@ fzf-cd-widget() { zle reset-prompt return $ret } -zle -N fzf-cd-widget -bindkey -M emacs '\ec' fzf-cd-widget -bindkey -M vicmd '\ec' fzf-cd-widget -bindkey -M viins '\ec' fzf-cd-widget +if [[ "${FZF_ALT_C_COMMAND-x}" != "" ]]; then + zle -N fzf-cd-widget + bindkey -M emacs '\ec' fzf-cd-widget + bindkey -M vicmd '\ec' fzf-cd-widget + bindkey -M viins '\ec' fzf-cd-widget +fi # CTRL-R - Paste the selected command from history into the command line fzf-history-widget() { |
