aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-24 11:50:24 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-24 11:50:57 +1200
commit356933675aaa9113c199d9699fea8923b3ef2260 (patch)
treef3decdc4bcc2aa6a49dbf7c7c23d8390b134c8dc
parentUse "color" spelling consistently (diff)
downloaddotfiles-356933675aaa9113c199d9699fea8923b3ef2260.tar.gz
dotfiles-356933675aaa9113c199d9699fea8923b3ef2260.zip
Rename gress() to gore()
Important work going on here, folks
-rw-r--r--README.markdown4
-rw-r--r--sh/shrc.d/gore.sh (renamed from sh/shrc.d/gress.sh)9
2 files changed, 6 insertions, 7 deletions
diff --git a/README.markdown b/README.markdown
index 8bef45ad..c59f8745 100644
--- a/README.markdown
+++ b/README.markdown
@@ -173,6 +173,8 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include:
variables.
* `gdb()` silences startup messages from `gdb(1)`.
* `gpg()` quietens `gpg(1)` down for most commands.
+* `gore(1)` runs the output of `grep(1)` through your pager, using color if
+ it can.
* `grep()` tries to apply color and other options good for interactive use,
depending on the capabilities of the system `grep(1)`.
* `hgrep()` allows searching `$HISTFILE`.
@@ -403,8 +405,6 @@ Installed by the `install-bin` target:
and does up to three silent retries using `try(1)`.
* `grc(1)` quietly tests whether the given directory appears to be a Git
repository with pending changes.
-* `gress(1)` runs the output of `grep(1)` through your pager, using color if
- it can
* `gscr(1)` scrubs Git repositories.
* `han(1)` provides a `keywordprg` for Vim's Bash script filetype that will
look for `help` topics. You could use it from the shell too.
diff --git a/sh/shrc.d/gress.sh b/sh/shrc.d/gore.sh
index 483198b3..1df637bb 100644
--- a/sh/shrc.d/gress.sh
+++ b/sh/shrc.d/gore.sh
@@ -1,7 +1,6 @@
-# Pipe grep(1) output through PAGER; mostly to preserve grep colouring
-# interactively through less(1), but it'll work fine with plain grep(1) and
-# more(1)
-gress() {
+# Pipe grep(1) output through PAGER; mostly to preserve coloring interactively
+# through less(1), but it'll work fine with plain grep(1) and more(1)
+gore() {
# Add --color=always if the terminal has at least 8 colors; we have to add
# "always" to coax grep(1) into emitting colors even though it can tell its
@@ -10,7 +9,7 @@ gress() {
[ "$({ tput colors || tput Co ; } 2>/dev/null)" -ge 8 ] &&
set -- --color=always "$@"
- # Run grep; it might be our function wrapper; that's OK
+ # Run whatever `grep` gives us; it might be our function wrapper; that's OK
grep "$@" |
# Run the appropriate pager; if it's less(1), we can tack on -R (though my