diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-10-30 10:39:38 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-10-30 10:39:38 +0200 |
| commit | 2a31393ecf448fb88d721ac09ef5b73bc8113ef7 (patch) | |
| tree | fd0dd1aceee9aaac31e55e25834f7bd074e6af1e /templess | |
| parent | b12b427f068a7b3302f227c3af8e90c18052ed64 (diff) | |
| download | scripts-2a31393ecf448fb88d721ac09ef5b73bc8113ef7.tar.gz scripts-2a31393ecf448fb88d721ac09ef5b73bc8113ef7.zip | |
Revert "Removed templess (I only used it with mmh)"
I actually used it to be able to pipe the content displayed by
less to an external command, which is used for example to find urls
in my emails with a less shortcut.
This reverts commit b12b427f068a7b3302f227c3af8e90c18052ed64.
Diffstat (limited to '')
| -rwxr-xr-x | templess | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templess b/templess new file mode 100755 index 0000000..ec3b999 --- /dev/null +++ b/templess | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Write standard in to a temporary file and sends it to a pager. | ||
| 4 | |||
| 5 | pager=${PAGER:-less} | ||
| 6 | tempfile=$(mktemp) | ||
| 7 | |||
| 8 | cat > "$tempfile" && $pager "$tempfile" | ||
