mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
Updated grc aliases
This commit is contained in:
parent
50f8012ed9
commit
7c9dc917dd
60
aliases.sh
60
aliases.sh
|
@ -72,27 +72,45 @@ alias ssh1="ssh -o ControlMaster=no"
|
|||
|
||||
|
||||
# Some colorizing options for grc
|
||||
GRC=$(which grc)
|
||||
if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
|
||||
#alias colourify="$GRC -es --colour=auto"
|
||||
alias colourify="$GRC --colour=auto"
|
||||
alias configure='colourify ./configure'
|
||||
alias diff='colourify diff'
|
||||
alias make='colourify make'
|
||||
alias gcc='colourify gcc'
|
||||
alias g++='colourify g++'
|
||||
alias as='colourify as'
|
||||
alias gas='colourify gas'
|
||||
alias ld='colourify ld'
|
||||
alias netstat='colourify netstat'
|
||||
alias ping='colourify ping'
|
||||
alias traceroute='colourify /usr/sbin/traceroute'
|
||||
alias head='colourify head'
|
||||
alias tail='colourify tail'
|
||||
alias dig='colourify dig'
|
||||
alias mount='colourify mount'
|
||||
alias ps='colourify ps'
|
||||
alias mtr='colourify mtr'
|
||||
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
|
||||
|
||||
if [[ -f ~/.dotfiles_aliases ]];
|
||||
|
|
Loading…
Reference in New Issue
Block a user