2015-10-10 16:35:08 +02:00
|
|
|
if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
|
|
|
|
|
|
|
|
# Supported commands
|
|
|
|
cmds=(
|
|
|
|
cc \
|
|
|
|
configure \
|
|
|
|
cvs \
|
|
|
|
df \
|
|
|
|
diff \
|
|
|
|
dig \
|
2018-06-25 17:35:38 +02:00
|
|
|
docker \
|
|
|
|
docker-compose \
|
|
|
|
docker-machine \
|
2015-10-10 16:35:08 +02:00
|
|
|
gcc \
|
|
|
|
gmake \
|
|
|
|
ifconfig \
|
|
|
|
last \
|
|
|
|
ldap \
|
|
|
|
ls \
|
|
|
|
make \
|
|
|
|
mount \
|
|
|
|
mtr \
|
|
|
|
netstat \
|
|
|
|
ping \
|
|
|
|
ping6 \
|
|
|
|
ps \
|
|
|
|
traceroute \
|
|
|
|
traceroute6 \
|
|
|
|
wdiff \
|
2018-01-06 13:04:34 +01:00
|
|
|
whois \
|
|
|
|
iwconfig \
|
2015-10-10 16:35:08 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
# Set alias for available commands.
|
|
|
|
for cmd in $cmds ; do
|
|
|
|
if (( $+commands[$cmd] )) ; then
|
2018-04-07 12:50:56 +02:00
|
|
|
alias $cmd="grc --colour=auto $(whence $cmd)"
|
2015-10-10 16:35:08 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Clean up variables
|
|
|
|
unset cmds cmd
|
|
|
|
fi
|