From 15c2d6569c578fb9eb60580b5e8a5df06eb6b2fd Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 27 Oct 2019 22:43:57 +0500 Subject: Use fzf package. --- files/.zsh/rc/S90_fzf | 5 ++++- install.sh | 19 ++----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/files/.zsh/rc/S90_fzf b/files/.zsh/rc/S90_fzf index 67cb4e9..0151fdc 100644 --- a/files/.zsh/rc/S90_fzf +++ b/files/.zsh/rc/S90_fzf @@ -1 +1,4 @@ -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +if $(which fzf >/dev/null) ; then + source /usr/share/doc/fzf/examples/key-bindings.zsh + source /usr/share/doc/fzf/examples/completion.zsh +fi diff --git a/install.sh b/install.sh index e1eacae..2712fba 100755 --- a/install.sh +++ b/install.sh @@ -46,28 +46,12 @@ check_command() { fi } -check_fzf() { - if [ -d $HOME/.fzf ] ; then - read -p "Update fzf? (y/n): " - if [ "y" == "$REPLY" ] ; then - cd $HOME/.fzf && git pull - $HOME/.fzf/install --all --no-update-rc - fi - else - read -p "Install fzf? (y/n): " - if [ "y" == "$REPLY" ] ; then - git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf - $HOME/.fzf/install --all --no-update-rc - fi - fi -} - after_install() { mkdir -p $HOME/tmp/vim-undo $HOME/tmp/vim-backup mkdir -p $HOME/.mutt/cache touch $HOME/.mutt/aliases - check_fzf check_command ag + check_command fzf } check_override() { @@ -90,5 +74,6 @@ if [[ "-f" = "$1" ]] ; then fi cd && \ + git -C "$dir" submodule update --init && \ ( ls --format=single-column --almost-all "$dir/files" | check_override | create_link ) && \ after_install -- cgit v1.2.3