From c3cb3a92a5126e62cd53efd6a7171785f796dbc0 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Fri, 8 Oct 2021 15:39:13 +0200 Subject: [PATCH] zshrc: improve alias --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 289b7a9..b348ad6 100644 --- a/zshrc +++ b/zshrc @@ -92,7 +92,7 @@ alias sysc="systemctl" alias rgo="rg -g '*.go' -g '!vendor/'" alias rgs="rg -g '*.go' -g '*.rb' -g '!vendor/' -g '!*_test.go' -g '!*_spec.rb'" alias rgt="rg -g '*_test.go' -g '*_spec.rb' -g '!vendor/'" -rgw() { rg -g '!vendor/' "\b$@\b" } +rgw() { SEARCH_TERM=$1; shift; rg -g '!vendor/' "\b$SEARCH_TERM\b" $* } alias tm="tmux attach" alias tmd="tmux new -s default -c $HOME || tmux attach -t default" alias tms="tmuxsess"