Skip to main content

add an alias for rg

ID
8adafbc
date
2023-08-22 21:21:37+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
1af899f
message
add an alias for rg
changed files
2 files, 18 additions, 2 deletions

Changed files

text/README.md (2596) → text/README.md (2885)

diff --git a/text/README.md b/text/README.md
index bc76a92..e7a6b7b 100644
--- a/text/README.md
+++ b/text/README.md
@@ -14,8 +14,8 @@ These are utilities for manipulating streams of text; I consider them in a simil
     print the nth line of a file.
     This is meant to fill a gap between the Unix utilities <code>head</code> and <code>tail</code>.
   </dd>
-  
-  
+
+
   <dt>
     <a href="https://github.com/alexwlchan/scripts/blob/main/text/midline">
       <code>midline [PATH]</code>
@@ -44,6 +44,16 @@ These are utilities for manipulating streams of text; I consider them in a simil
   </dd>
 
   <dt>
+    <a href="https://github.com/alexwlchan/scripts/blob/main/text/r">
+      <code>r</code>
+    </a>
+  </dt>
+  <dd>
+    an alias for <code>rg</code>, aka <a href="https://geoff.greer.fm/ag/">the Silver Searcher</a>.
+    (Yes, I really am too lazy to type two whole characters.)
+  </dd>
+
+  <dt>
     <a href="https://github.com/alexwlchan/scripts/blob/main/text/randline">
       <code>randline [NUMBER] < [PATH]</code>
     </a>

text/r (0) → text/r (60)

diff --git a/text/r b/text/r
new file mode 100755
index 0000000..df97c54
--- /dev/null
+++ b/text/r
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+
+rg "$@"