Skip to content

Commit

Permalink
Add funcs to grep/ls to add colour
Browse files Browse the repository at this point in the history
Env variables are deprecated in newer version of grep
  • Loading branch information
jloh committed Apr 18, 2019
1 parent 618a925 commit c7e32bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pers/grep.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function grep --description 'Adds color to grep'
command grep --color=auto $argv
end
3 changes: 3 additions & 0 deletions pers/ls.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function ls --description 'Adds color to ls'
command ls -G $argv
end
3 changes: 0 additions & 3 deletions source/50_misc.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# All the colours
set -x GREP_OPTIONS '--color=auto'

# Prevent less from clearing the screen while still showing colors.
set -x LESS '-XR'

Expand Down

0 comments on commit c7e32bd

Please sign in to comment.