aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-24 11:59:17 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-24 11:59:17 +1200
commit73192c889d5376e1d30685d681c74c68d014e48a (patch)
tree02db1a1ca2308db9b346a7f58c5c024d04e679d4 /sh/shrc.d
parentAdd lore() (diff)
downloaddotfiles-73192c889d5376e1d30685d681c74c68d014e48a.tar.gz
dotfiles-73192c889d5376e1d30685d681c74c68d014e48a.zip
Add -n to grep(1) call for gore()
Diffstat (limited to 'sh/shrc.d')
-rw-r--r--sh/shrc.d/gore.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sh/shrc.d/gore.sh b/sh/shrc.d/gore.sh
index 1df637bb..2cdb8bd6 100644
--- a/sh/shrc.d/gore.sh
+++ b/sh/shrc.d/gore.sh
@@ -10,7 +10,8 @@ gore() {
set -- --color=always "$@"
# Run whatever `grep` gives us; it might be our function wrapper; that's OK
- grep "$@" |
+ # Include -n to show line numbers; this is POSIX, which was a nice surprise
+ grep -n "$@" |
# Run the appropriate pager; if it's less(1), we can tack on -R (though my
# ~/.lesskey does this anyway)