summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-01-23 10:17:45 +0100
committerGitHub <noreply@github.com>2021-01-23 10:17:45 +0100
commit1467b353a09f9f6fb503b43f78a0c2082ff84773 (patch)
tree1fa5893cc1645e39b0ae3f10bb79be81ef0306c6
parent15e2eca0c67b25b5f03ee981e8f62bb572b9fefb (diff)
Update .zshrc
ruby version and rga func
-rw-r--r--zsh/.zshrc19
1 files changed, 19 insertions, 0 deletions
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"
+}