19 lines
687 B
Bash
Executable File

#!/bin/sh
pushd ${HOME} 2>&1 > /dev/null && { \
sh -c "find $(git ls-files -- \
':!:.oh-my-zsh' ':!:.config/alfred' \
':!:.config/zsh/custom/plugins' \
':!:.config/zsh/custom/themes' \
| xargs -I{} dirname '{}' \
| grep -v '^.$' \
| sort -u \
| xargs -I{} printf "'%s' " '{}') -type f -maxdepth 1 -mindepth 1 -not -path '*.DS_Store' -not -path '*.png' -not -path '*.keep' -not -path '*.plist' -not -path '*.itermcolors' -not -path '*.terminal'"; \
git ls-files ':(glob)*'; \
} | sort -u | uniq | fzf \
--preview 'bat --color=always --style=numbers --line-range=:500 --theme="GitHub" {}' \
--preview-window=right:60%:wrap \
--bind 'enter:execute(nvim {})+abort'