slackbuilds_ponce/misc/grc/grc.zsh
Edinaldo P. Silva c5b5f708c8 misc/grc: Added (generic colouriser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2015-11-28 07:25:59 +07:00

40 lines
637 B
Bash

if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
# Prevent grc aliases from overriding zsh completions.
setopt COMPLETE_ALIASES
# Supported commands
cmds=(
cc \
configure \
cvs \
df \
diff \
dig \
gcc \
gmake \
ifconfig \
last \
ldap \
ls \
make \
mount \
mtr \
netstat \
ping \
ping6 \
ps \
traceroute \
traceroute6 \
wdiff \
);
# Set alias for available commands.
for cmd in $cmds ; do
if (( $+commands[$cmd] )) ; then
alias $cmd="grc --colour=auto $cmd"
fi
done
# Clean up variables
unset cmds cmd
fi