mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
c5b5f708c8
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
40 lines
637 B
Bash
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
|