From 703768d712dd537ac41db9f5a9ccbe1adf58ddbb Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 27 Feb 2022 13:32:48 -0600 Subject: [PATCH] Drop fzf installation, favor package manager installed version My dotfiles rarely change, but the plugins and apps I use have regular updates. I don't refresh my local dotfiles frequently, so it makes sense to favor moving these things out of my installer and let the operating system's package manager handle keeping them up to date. Also left some notes for later when I get my new MBP. --- install | 8 ++------ zsh/.zshrc | 5 ++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/install b/install index 859ae10..c8454cf 100755 --- a/install +++ b/install @@ -4,7 +4,7 @@ if [ -z "$HOME" ]; then echo "Seems you're \$HOMEless :("; exit 1; fi -COMMANDS="curl git stow" +COMMANDS="curl fzf git stow" for COMMAND in $COMMANDS; do if ! command -v "$COMMAND" &> /dev/null; then @@ -14,7 +14,6 @@ for COMMAND in $COMMANDS; do done DOTFILES=$HOME/.dotfiles -DOTFZF=$HOME/.fzf DOTLOCAL=$HOME/.local/share/dotfiles GITCLONE="git clone --depth=1" @@ -27,14 +26,11 @@ else git pull origin main fi -rm -rf "$DOTFZF" "$DOTLOCAL" +rm -rf "$DOTLOCAL" mkdir -p "$DOTLOCAL" stow git screen vim zsh -$GITCLONE https://github.com/junegunn/fzf.git "$DOTFZF" -"$DOTFZF/install" --key-bindings --completion --no-update-rc - ZSHPLUGS=( "zsh-completions" "zsh-history-substring-search" diff --git a/zsh/.zshrc b/zsh/.zshrc index 123789b..8ce8dd4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -66,9 +66,12 @@ PS1=' %F{blue}%~$(git_prompt) %F{244}%# %F{reset}' -source $HOME/.fzf.zsh +# TODO: May need to tweak this for macOS/brew installed fzf +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh # Only autoload nvm on a specific machine, default to lazy loading +# TODO: Maybe drop the lazy loading entirely as I never use nvm outside of work? if [[ $(hostname) == "x1carbon.josh" ]]; then export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] \ && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"