diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-04 10:55:46 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-04 10:55:46 +1200 |
commit | 3811906a2c4ec6a42fcf67dca789231a54563afd (patch) | |
tree | 88f60474369081af4920c4f3920aba7fd79f2583 | |
parent | Rename pan() to paz() (like grep -Z) (diff) | |
download | dotfiles-3811906a2c4ec6a42fcf67dca789231a54563afd.tar.gz dotfiles-3811906a2c4ec6a42fcf67dca789231a54563afd.zip |
readz alias for read -d '' -r
-rw-r--r-- | README.markdown | 1 | ||||
-rw-r--r-- | bash/bashrc.d/readz.bash | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 497d5fe5..2f5c209b 100644 --- a/README.markdown +++ b/README.markdown @@ -187,6 +187,7 @@ There are a few other little tricks in `bash/bashrc.d`, including: * `paz` — Print given arguments separated by NULL chars * `path` — Manage the contents of `PATH` conveniently * `pd` — Change to the argument’s parent directory +* `readz` — Alias for `read -d '' -r` * `scr` — Create a temporary directory and change into it * `sprunge` — Pastebin frontend tool I pilfered from `#bash` on Freenode * `ud` — Change into an indexed ancestor of a directory diff --git a/bash/bashrc.d/readz.bash b/bash/bashrc.d/readz.bash new file mode 100644 index 00000000..4b35979c --- /dev/null +++ b/bash/bashrc.d/readz.bash @@ -0,0 +1,5 @@ +# Call read with a null delimiter +readz() { + builtin read -d '' -r "$@" +} + |