[bugfix] preview for fzf
This commit is contained in:
parent
7ba2800945
commit
7358f7588e
|
@ -5,10 +5,11 @@ if status is-interactive
|
|||
set -gx EDITOR nvim
|
||||
|
||||
# === fzf configuration
|
||||
set -gx FZF_DEFAULT_COMMAND 'ag -g ""'
|
||||
set -U FZF_DEFAULT_COMMAND 'ag -g ""'
|
||||
set -U FZF_COMPLETE 0
|
||||
set -U FZF_FIND_FILE_COMMAND 'ag -g ""'
|
||||
set -U FZF_OPEN_COMMAND 'ag -g ""'
|
||||
set -U FZF_DEFAULT_OPTS '--height 40% --preview "bat --style=numbers --color=always --line-range :500 {}"'
|
||||
|
||||
# === less configuration
|
||||
# no line-wrapping, good for `docker ps`
|
||||
|
|
|
@ -11,11 +11,9 @@ case "$PM" in
|
|||
sudo add-apt-repository ppa:fish-shell/release-3 -y
|
||||
sudo apt update
|
||||
sudo apt install fish libnotify-bin xdotool silversearcher-ag dash bat -y
|
||||
[ ! -d $HOME/.fzf ] && git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf
|
||||
[ ! -d "$HOME/.fzf" ] && git clone --depth 1 https://github.com/junegunn/fzf.git "$HOME/.fzf"
|
||||
~/.fzf/install --all
|
||||
lnsf /usr/bin/batcat "$HOME/.local/bin/bat"
|
||||
mkdir -p "$(bat --config-dir)/themes"
|
||||
git clone --depth 1 https://github.com/peaceant/gruvbox.git "$(bat --config-dir)/themes/grubox"
|
||||
;;
|
||||
pacman)
|
||||
sudo pacman -S --needed --needed fish xdotool fzf the_silver_searcher dash bat
|
||||
|
@ -37,6 +35,14 @@ case "$PM" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# install bat theme
|
||||
BAT_THEMES="$(bat --config-dir)/themes"
|
||||
BAT_GRUVBOX="$BAT_THEMES/gruvbox"
|
||||
if [ ! -d "$BAT_GRUVBOX" ]; then
|
||||
mkdir -p "$BAT_THEMES"
|
||||
git clone --depth 1 https://github.com/peaceant/gruvbox.git "$BAT_GRUVBOX"
|
||||
fi
|
||||
|
||||
# use dash as default shell because it much faster and will be used vim-fugitive,
|
||||
# leads to a much faster responsive speed
|
||||
sudo /usr/bin/ln -sfT dash /usr/bin/sh
|
||||
|
|
Loading…
Reference in New Issue
Block a user