1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-23 20:11:31 +01:00

replace grc aliases with the sourcing of the correct file

This commit is contained in:
bretello 2020-02-14 16:37:42 +01:00
parent c0ac8250f1
commit 3c048d2d48

View File

@ -70,54 +70,15 @@ alias mdiff="mate -t source.diff"
alias ssh1="ssh -o ControlMaster=no" alias ssh1="ssh -o ControlMaster=no"
# Some colorizing options for grc # grc: try to source the definitions file in /etc/grc.zsh (print a warning if it does not exist)
if [[ "$TERM" != dumb ]] && [[ -f $(which grc) ]] ; then if [[ -f /etc/grc.zsh ]]; then
# Prevent grc aliases from overriding zsh completions. echo "Could not find /etc/grc.zsh, command colorization will not work. Check your grc configuration" 1>&2
setopt COMPLETE_ALIASES else
source /etc/grc.zsh
# Supported commands
cmds=(
ls \
cc \
configure \
cvs \
df \
diff \
dig \
gcc \
gmake \
ifconfig \
iptables \
last \
ldap \
make \
mount \
mtr \
netstat \
ping \
ping6 \
ps \
ss \
traceroute \
traceroute6 \
wdiff \
);
# Set alias for available commands.
for cmd in $cmds ; do
if [[ -f $(which $cmd) ]] ; then
alias $cmd="grc --colour=on $cmd"
fi
done
# Clean up variables
unset cmds cmd
fi fi
# dotfiles user aliases
if [[ -f ~/.dotfiles_aliases ]]; if [[ -f ~/.dotfiles_aliases ]];
then then
source ~/.dotfiles_aliases source ~/.dotfiles_aliases
fi fi