about summary refs log tree commit diff
path: root/profile/.profile.d/grep.sh
blob: 013a8ede7a5f1fc80fb3ad8b547182bea067ca50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if command -v grep >/dev/null 2>&1; then
	alias gr="grep"

	if command -v batgrep >/dev/null 2>&1; then
		alias gr="batgrep"
	fi
fi

if command -v egrep >/dev/null 2>&1; then
	alias egr="egrep"
fi

if command -v pgrep >/dev/null 2>&1; then
	alias pgr="pgrep"
fi

Consider giving Nix/NixOS a try! <3