mirror of
https://github.com/garabik/grc.git
synced 2024-11-15 14:48:26 +01:00
ad736f824e
do not colorize if output is not a terminal
26 lines
925 B
Fish
26 lines
925 B
Fish
#!/usr/bin/env fish
|
|
#
|
|
# To load in ~/.config/fish/fish.conf or a new file in
|
|
# ~/.config/fish/conf.d add:
|
|
# source /etc/grc.fish (path may depend on install method)
|
|
#
|
|
# See also the plugin at https://github.com/oh-my-fish/plugin-grc
|
|
|
|
set -U grc_plugin_execs cat cvs df diff dig gcc g++ ls ifconfig \
|
|
make mount mtr netstat ping ps tail traceroute \
|
|
wdiff blkid du dnf docker docker-machine env id ip iostat \
|
|
last lsattr lsblk lspci lsmod lsof getfacl getsebool ulimit uptime nmap \
|
|
fdisk findmnt free semanage sar ss sysctl systemctl stat showmount \
|
|
tcpdump tune2fs vmstat w who
|
|
|
|
for executable in $grc_plugin_execs
|
|
if type -q $executable
|
|
function $executable --inherit-variable executable --wraps=$executable
|
|
if isatty 1
|
|
grc $executable $argv
|
|
else
|
|
eval command $executable $argv
|
|
end
|
|
end
|
|
end
|
|
end
|