aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/grep.fish
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-20 23:02:03 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-20 23:02:03 +1000
commitea0005e16d2e621f35913fb9c4f768f47666953b (patch)
treee46adb01d68904f2000729b925e20651ba76598e /share/functions/grep.fish
parent6901ad361d5e8e96036e266a315b1dc45ba08bb0 (diff)
Move code for setting ls and grep colors to function definition files
darcs-hash:20060220130203-ac50b-feb426f6450a0bbd17cb9dacdca94d4d5b72c113.gz
Diffstat (limited to 'share/functions/grep.fish')
-rw-r--r--share/functions/grep.fish13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/functions/grep.fish b/share/functions/grep.fish
new file mode 100644
index 00000000..212fe3ca
--- /dev/null
+++ b/share/functions/grep.fish
@@ -0,0 +1,13 @@
+#
+# Match colors for grep, if supported
+#
+
+if grep --color=auto --help 1>/dev/null 2>/dev/null
+ if not set -q GREP_COLOR
+ set -gx GREP_COLOR '97;45'
+ end
+ if not set -q GREP_OPTIONS
+ set -gx GREP_OPTIONS '97;45'
+ end
+end
+