From d76c4d8985cae86fd1f2b00c4690f1d2720c63a4 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 5 Jun 2017 18:06:02 +0200 Subject: Don't require rg for filter alias --- conf.d/90-alias.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'conf.d/90-alias.zsh') diff --git a/conf.d/90-alias.zsh b/conf.d/90-alias.zsh index da6219d..610fdce 100644 --- a/conf.d/90-alias.zsh +++ b/conf.d/90-alias.zsh @@ -36,7 +36,13 @@ alias ta='task add' alias pe=patchelf alias -g L='| less ' -alias -g F='| rg -i ' + +if (($+commands[rg])); then + alias -g F='| rg -i ' +else + alias -g F='| grep -i ' +fi + alias -g X='| xargs ' alias -g SDN=' >/dev/null ' alias -g EDN=' 2>/dev/null ' -- cgit v1.2.3