Merge branch 'kapsh-commands' into devel

This commit is contained in:
Radovan Garabík 2018-12-25 19:32:23 +01:00
commit 677295cb8f
2 changed files with 71 additions and 30 deletions

View File

@ -1,6 +1,6 @@
GRC="$(which grc)"
if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
alias colourify="$GRC -es --colour=auto"
alias colourify="$GRC -es"
alias blkid='colourify blkid'
alias configure='colourify ./configure'
alias df='colourify df'

99
grc.zsh
View File

@ -2,42 +2,83 @@ if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
# Supported commands
cmds=(
cc \
configure \
cvs \
df \
diff \
dig \
docker \
docker-compose \
docker-machine \
gcc \
gmake \
ifconfig \
last \
ldap \
ls \
make \
mount \
mtr \
netstat \
ping \
ping6 \
ps \
traceroute \
traceroute6 \
wdiff \
whois \
iwconfig \
);
ant
blkid
cc
configure
cvs
df
diff
dig
dnf
docker
docker-compose
docker-machine
du
env
fdisk
findmnt
free
gcc
getfacl
getsebool
gmake
id
ifconfig
iostat
ip
iptables
iwconfig
journalctl
kubectl
last
ldap
lolcat
ls
lsattr
lsblk
lsmod
lsof
lspci
make
mount
mtr
mvn
netstat
nmap
ntpdate
php
ping
ping6
proftpd
ps
pv
sar
semanage
sensors
showmount
ss
stat
sysctl
systemctl
tcpdump
traceroute
traceroute6
tune2fs
uptime
vmstat
wdiff
whois
)
# Set alias for available commands.
for cmd in $cmds ; do
if (( $+commands[$cmd] )) ; then
alias $cmd="grc --colour=auto $(whence $cmd)"
alias $cmd="grc $(whence $cmd)"
fi
done
# Clean up variables
unset cmds cmd
fi