diff options
author | Edinaldo P. Silva <edps.mundognu@gmail.com> | 2015-11-25 15:34:11 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-11-28 07:25:59 +0700 |
commit | c5b5f708c88806b192814847333b4c53ca438a53 (patch) | |
tree | 028fcab90c6464112db4222b6c7322381bcff96d /misc/grc/grc.zsh | |
parent | cb1cd1612ee3e9f25edb3736e71a5f03782f506f (diff) | |
download | slackbuilds-c5b5f708c88806b192814847333b4c53ca438a53.tar.gz |
misc/grc: Added (generic colouriser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/grc/grc.zsh')
-rw-r--r-- | misc/grc/grc.zsh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/misc/grc/grc.zsh b/misc/grc/grc.zsh new file mode 100644 index 0000000000..f02db3ab83 --- /dev/null +++ b/misc/grc/grc.zsh @@ -0,0 +1,40 @@ +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 |