summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc11
1 files changed, 6 insertions, 5 deletions
diff --git a/.zshrc b/.zshrc
index b69376f..a5154e2 100644
--- a/.zshrc
+++ b/.zshrc
@@ -237,9 +237,6 @@ fzf-history-widget() {
typeset -f zle-line-init >/dev/null && zle zle-line-init
return $ret
}
-zle -N fzf-history-widget
-bindkey '^R' fzf-history-widget
-
__fsel() {
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
@@ -262,8 +259,12 @@ fzf-file-widget() {
return $ret
}
-zle -N fzf-file-widget
-bindkey '^T' fzf-file-widget
+if type fzf &>/dev/null; then
+ zle -N fzf-history-widget
+ bindkey '^R' fzf-history-widget
+ zle -N fzf-file-widget
+ bindkey '^T' fzf-file-widget
+fi
# }}}
# Variables {{{