comparison dot_zshrc @ 588:7f2a18dd6b8f

Clean up unused zsh function
author zegervdv <zegervdv@me.com>
date Sat, 16 Apr 2022 17:59:38 +0200
parents 77280c499124
children bfcc28bfd070
comparison
equal deleted inserted replaced
587:77280c499124 588:7f2a18dd6b8f
210 export HGEDITOR=nvim 210 export HGEDITOR=nvim
211 211
212 export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc 212 export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc
213 export BAT_CONFIG_PATH=$HOME/.config/bat/config 213 export BAT_CONFIG_PATH=$HOME/.config/bat/config
214 214
215 # # source: https://gist.github.com/gnanderson/d74079d16714bb8b2822a7a07cc883d4
216 function fif() {
217 rg \
218 --column \
219 --no-heading \
220 --fixed-strings \
221 --ignore-case \
222 --hidden \
223 --follow \
224 --glob '!.git/*' "$1" \
225 | awk -F ":" '/1/ {start = $2<5 ? 0 : $2 - 5; end = $2 + 5; print $1 " " $2 " " start ":" end " " $3}' \
226 | fzf --preview 'bat --wrap character --color always {1} --highlight-line {2} --line-range {3}' \
227 --bind 'ctrl-o:execute(nvim {1}:{2}:{4})+cancel'
228 }
229
230 [ -f ~/.zshrc.local ] && source ~/.zshrc.local 215 [ -f ~/.zshrc.local ] && source ~/.zshrc.local
231 216
232 # Must run after brew is loaded 217 # Must run after brew is loaded
233 export SUDO_EDITOR=$(which nvim) 218 export SUDO_EDITOR=$(which nvim)
234 eval "$(direnv hook zsh)" 219 eval "$(direnv hook zsh)"