summaryrefslogtreecommitdiff
path: root/misc/grc/grc.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'misc/grc/grc.zsh')
-rw-r--r--misc/grc/grc.zsh40
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