From 1467b353a09f9f6fb503b43f78a0c2082ff84773 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 23 Jan 2021 10:17:45 +0100 Subject: Update .zshrc ruby version and rga func --- zsh/.zshrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index a105915..9eaf1bb 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -19,3 +19,22 @@ export WORKON_HOME=$HOME/.virtualenvs source /usr/share/virtualenvwrapper/virtualenvwrapper.sh eval "$(direnv hook zsh)" +# Install Ruby Gems to ~/gems +export GEM_HOME="$HOME/.gems" +export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH" +alias mutt=neomutt +export TERM=xterm-256color + +rga() { + RG_PREFIX="rg --files-with-matches" + local file + + file="$( + FZF_DEFAULT_COMMAND="$RG_PREFIX '$*'" \ + fzf --sort --preview="[[ ! -z {} ]] && rg --pretty --context 5 {q}" \ + --phony -q "$*" \ + --bind "change:reload:$RG_PREFIX {q}" \ + --preview-window="70%:wrap" + )" && + xdg-open "$file" +} -- cgit v1.2.3-18-g5258