aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-02 10:55:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-02 10:55:42 +1200
commitb2a43a059fe39df9bd732f51e648410d0282b590 (patch)
treed140556d9b99feccb0f81dc39fb6ce13a133e84a
parentAdd mention of existing clwr() function (diff)
downloaddotfiles-b2a43a059fe39df9bd732f51e648410d0282b590.tar.gz
dotfiles-b2a43a059fe39df9bd732f51e648410d0282b590.zip
Add clrd()
-rw-r--r--README.markdown1
-rw-r--r--bash/bashrc.d/clrd.bash6
2 files changed, 7 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index ab8d9f83..acbe8d3a 100644
--- a/README.markdown
+++ b/README.markdown
@@ -185,6 +185,7 @@ I also add completions for my own scripts and functions where useful.
There are a few other little tricks in `bash/bashrc.d`, including:
* `bd` changes into a named ancestor of the current directory.
+* `clrd` sets up a per-line file read, clearing the screen first
* `clwr` sets up a per-line file write, clearing the screen before each line
* `fnl` runs a command and save its output and error into temporary files.
* `hgrep` searches `$HISTFILE`.
diff --git a/bash/bashrc.d/clrd.bash b/bash/bashrc.d/clrd.bash
new file mode 100644
index 00000000..dbfc0ea1
--- /dev/null
+++ b/bash/bashrc.d/clrd.bash
@@ -0,0 +1,6 @@
+# Clear screen, start tail -f on a file
+clrd() {
+ clear
+ tail -f
+}
+