diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-27 16:34:39 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-27 16:34:39 +1300 |
commit | e8e999266652d74c8c0fb5c856c16ec10a22facd (patch) | |
tree | 4ba84d338bbdd3a20d8a01c7fdd391306b02a436 | |
parent | s/exit/return/ in ex-subshell func (diff) | |
download | dotfiles-e8e999266652d74c8c0fb5c856c16ec10a22facd.tar.gz dotfiles-e8e999266652d74c8c0fb5c856c16ec10a22facd.zip |
Add quo(1df)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | README.markdown | 1 | ||||
-rw-r--r-- | bin/quo.sed | 3 | ||||
-rw-r--r-- | man/man1/quo.1df | 22 |
5 files changed, 28 insertions, 0 deletions
@@ -15,6 +15,7 @@ bin/min bin/mode bin/nlbr bin/onl +bin/quo bin/rfct bin/rndi bin/sd2u @@ -84,6 +84,7 @@ BINS = bin/brnl \ bin/mode \ bin/nlbr \ bin/onl \ + bin/quo \ bin/rfct \ bin/rndi \ bin/sd2u \ diff --git a/README.markdown b/README.markdown index be0f6481..df6e6e66 100644 --- a/README.markdown +++ b/README.markdown @@ -484,6 +484,7 @@ Installed by the `install-bin` target: [`plenv`](https://github.com/tokuhirom/plenv), filters out any modules in `~/.plenv/non-cpan-modules`, and updates them all. * `pwg(1df)` generates just one decent password with `pwgen(1)`. +* `quo(1df)` quotes its input with right angle brackets. * `rgl(1df)` is a very crude interactive `grep(1)` loop. * `shb(1df)` attempts to build shebang lines for scripts from the system paths. diff --git a/bin/quo.sed b/bin/quo.sed new file mode 100644 index 00000000..1100d5ce --- /dev/null +++ b/bin/quo.sed @@ -0,0 +1,3 @@ +#!/bin/sed -f +/^[^>]/s/^/ / +s/^/>/ diff --git a/man/man1/quo.1df b/man/man1/quo.1df new file mode 100644 index 00000000..643d8ff5 --- /dev/null +++ b/man/man1/quo.1df @@ -0,0 +1,22 @@ +.TH QUO 1df "January 2017" "Manual page for quo" +.SH NAME +.B quo +\- quote the input with right-angle brackets +.SH SYNOPSIS +.B quo +.br +Text on standard input. +.br +^D +.br +.B quo +FILE1 [FILE2...] +.br +.B quo < FILE +.SH DESCRIPTION +.B quo +quotes its input by insert a right-angle bracket followed by a space at the +start of every unquoted line. If the line was already quoted, it adds another +level of right-angle bracket. +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> |