aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-27 16:34:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-27 16:34:39 +1300
commite8e999266652d74c8c0fb5c856c16ec10a22facd (patch)
tree4ba84d338bbdd3a20d8a01c7fdd391306b02a436
parents/exit/return/ in ex-subshell func (diff)
downloaddotfiles-e8e999266652d74c8c0fb5c856c16ec10a22facd.tar.gz
dotfiles-e8e999266652d74c8c0fb5c856c16ec10a22facd.zip
Add quo(1df)
-rw-r--r--.gitignore1
-rw-r--r--Makefile1
-rw-r--r--README.markdown1
-rw-r--r--bin/quo.sed3
-rw-r--r--man/man1/quo.1df22
5 files changed, 28 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b0ad92d7..6e82dcd6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ bin/min
bin/mode
bin/nlbr
bin/onl
+bin/quo
bin/rfct
bin/rndi
bin/sd2u
diff --git a/Makefile b/Makefile
index 504e48e4..e35d5c40 100644
--- a/Makefile
+++ b/Makefile
@@ -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>