mirror of https://github.com/garabik/grc.git
clean up zsh syntax
This commit is contained in:
parent
371f85a580
commit
b16ae2647d
25
grc.zsh
25
grc.zsh
|
@ -1,7 +1,9 @@
|
|||
if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
|
||||
if [[ "$TERM" = dumb ]] || (( ! $+commands[grc] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# Supported commands
|
||||
cmds=(
|
||||
# Supported commands
|
||||
cmds=(
|
||||
as
|
||||
ant
|
||||
blkid
|
||||
|
@ -60,6 +62,7 @@ if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
|
|||
semanage
|
||||
sensors
|
||||
showmount
|
||||
sockstat
|
||||
ss
|
||||
stat
|
||||
sysctl
|
||||
|
@ -72,17 +75,15 @@ if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
|
|||
vmstat
|
||||
wdiff
|
||||
whois
|
||||
sockstat
|
||||
)
|
||||
)
|
||||
|
||||
# Set alias for available commands.
|
||||
for cmd in $cmds ; do
|
||||
# Set alias for available commands.
|
||||
for cmd in $cmds ; do
|
||||
if (( $+commands[$cmd] )) ; then
|
||||
alias $cmd="grc $(whence $cmd)"
|
||||
alias $cmd="grc --colour=auto $commands[$cmd]"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Clean up variables
|
||||
unset cmds cmd
|
||||
fi
|
||||
# Clean up variables
|
||||
unset cmds cmd
|
||||
|
||||
|
|
Loading…
Reference in New Issue