mirror of
https://github.com/garabik/grc.git
synced 2024-11-10 21:26:52 +01:00
7eaacb5c4a
98f483068a (r45477503)
Signed-off-by: hjpotter92 <hjpotter92+github@gmail.com>
96 lines
933 B
Bash
96 lines
933 B
Bash
#!/usr/bin/env zsh
|
|
|
|
if [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
|
|
then
|
|
return
|
|
fi
|
|
|
|
# Supported commands
|
|
cmds=(
|
|
as
|
|
ant
|
|
blkid
|
|
cc
|
|
configure
|
|
curl
|
|
cvs
|
|
df
|
|
diff
|
|
dig
|
|
dnf
|
|
docker
|
|
docker-compose
|
|
docker-machine
|
|
du
|
|
env
|
|
fdisk
|
|
findmnt
|
|
free
|
|
g++
|
|
gas
|
|
gcc
|
|
getfacl
|
|
getsebool
|
|
gmake
|
|
id
|
|
ifconfig
|
|
iostat
|
|
ip
|
|
iptables
|
|
iwconfig
|
|
journalctl
|
|
kubectl
|
|
last
|
|
ldap
|
|
lolcat
|
|
ld
|
|
ls
|
|
lsattr
|
|
lsblk
|
|
lsmod
|
|
lsof
|
|
lspci
|
|
make
|
|
mount
|
|
mtr
|
|
mvn
|
|
netstat
|
|
nmap
|
|
ntpdate
|
|
php
|
|
ping
|
|
ping6
|
|
proftpd
|
|
ps
|
|
sar
|
|
semanage
|
|
sensors
|
|
showmount
|
|
sockstat
|
|
ss
|
|
stat
|
|
sysctl
|
|
systemctl
|
|
tcpdump
|
|
traceroute
|
|
traceroute6
|
|
tune2fs
|
|
ulimit
|
|
uptime
|
|
vmstat
|
|
wdiff
|
|
whois
|
|
)
|
|
|
|
# Set alias for available commands.
|
|
for cmd in $cmds ; do
|
|
if (( $+commands[$cmd] )) ; then
|
|
$cmd() {
|
|
grc --colour=auto ${commands[$0]} "$@"
|
|
}
|
|
fi
|
|
done
|
|
|
|
# Clean up variables
|
|
unset cmds cmd
|