diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-07-08 16:29:00 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-10-08 15:57:56 +0200 |
commit | f8395e1081b9ab73ed59261b9b8cf842561fb198 (patch) | |
tree | 1d44c545a3e0176e3557459eee4851d7f1c66a32 | |
parent | bc7f2a4df10ea63befd9a1103cd115ccc1c6186b (diff) | |
download | dotfiles-f8395e1081b9ab73ed59261b9b8cf842561fb198.tar.gz dotfiles-f8395e1081b9ab73ed59261b9b8cf842561fb198.tar.xz |
zshrc: Only use fzf when installed
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | .zshrc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 {{{ |