aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-02 14:37:21 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-02 14:37:21 +1200
commitfc55a56c067d55c63991ddb416be4e742745450f (patch)
treec3dd11d53e50f4f42eacf4abe00d19e0e0c8663c
parentSeparate flag from line test in slsf(1) (diff)
downloaddotfiles-fc55a56c067d55c63991ddb416be4e742745450f.tar.gz
dotfiles-fc55a56c067d55c63991ddb416be4e742745450f.zip
Get rid of a lot of comment boilerplate
This is all stuff that should be or is in the manpages
-rwxr-xr-xbin/apf3
-rwxr-xr-xbin/edda16
-rwxr-xr-xbin/eds12
-rwxr-xr-xbin/gms9
-rwxr-xr-xbin/han25
-rwxr-xr-xbin/igex14
-rwxr-xr-xbin/maybe14
-rwxr-xr-xbin/murl11
-rwxr-xr-xbin/stbl12
-rwxr-xr-xbin/tl16
-rwxr-xr-xbin/tlcs17
-rwxr-xr-xbin/try16
-rwxr-xr-xbin/urlc13
13 files changed, 13 insertions, 165 deletions
diff --git a/bin/apf b/bin/apf
index 2d137c6b..06f7aa6b 100755
--- a/bin/apf
+++ b/bin/apf
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
-
-# Name self
+# Prepend arguments from a file to a command call
self=apf
# Require at least two arguments, give usage otherwise
diff --git a/bin/edda b/bin/edda
index ee65fd9f..0f242c58 100755
--- a/bin/edda
+++ b/bin/edda
@@ -1,19 +1,5 @@
#!/usr/bin/env bash
-
-#
-# edda(1) -- Run ed(1) over multiple files, duplicating stdin. Example:
-#
-# $ edda -s /etc/app.d/*.conf <<'EOF'
-# ,s/foo/bar/g
-# w
-# EOF
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2015
-# License: Public domain
-#
-
-# Name self
+# Run ed(1) over multiple files, duplicating stdin.
self=edda
# Define usage function
diff --git a/bin/eds b/bin/eds
index 6cc9fdab..06686810 100755
--- a/bin/eds
+++ b/bin/eds
@@ -1,15 +1,5 @@
#!/usr/bin/env bash
-
-#
-# eds(1) -- Create and edit executable scripts in a directory EDSPATH (defaults
-# to ~/.local/bin).
-#
-# Author: Tom Ryder
-# Copyright: 2015
-# License: Public domain
-#
-
-# Name self
+# Create and edit executable scripts in a directory EDSPATH (defaults to ~/.local/bin)
self=eds
# Define a function to show usage
diff --git a/bin/gms b/bin/gms
index 7ab865f2..124a5389 100755
--- a/bin/gms
+++ b/bin/gms
@@ -1,12 +1,5 @@
#!/usr/bin/env bash
-
-#
-# Run getmail(1) over every getmailrc.* file in ~/.getmail (I didn't like the
-# included getmails(1) script).
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-#
+# Run getmail(1) over every getmailrc.* file in ~/.getmail
self=gms
# Check for existence of needed commands
diff --git a/bin/han b/bin/han
index 34b33ab3..7c495d2b 100755
--- a/bin/han
+++ b/bin/han
@@ -1,28 +1,5 @@
#!/usr/bin/env bash
-
-#
-# If called with a single argument, try running the help builtin for the given
-# keyword, writing its output to a file. If it succeeds, show that. If not,
-# pass the call to man(1).
-#
-# This was written so it could be used as a 'keywordprg' in Vim for Bash files;
-# you can then use the K normal-mode binding over both shell builtins (e.g. read,
-# set, export) and external programs (e.g. cat, grep, ed).
-#
-# :set keywordprg=han
-#
-# You could put the above command in ~/.vim/after/ftplugin/sh.vim like this:
-#
-# " Use han(1) as a man(1) wrapper for Bash files if available
-# if exists("b:is_bash") && executable('han')
-# setlocal keywordprg=han
-# endif
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2015 Inspire Net Ltd
-#
-
-# Name self
+# Abstract calls to Bash help vs man(1)
self=han
# Give up completely if no BASH_VERSINFO (<2.0)
diff --git a/bin/igex b/bin/igex
index c4570ca2..0bd36cc0 100755
--- a/bin/igex
+++ b/bin/igex
@@ -1,17 +1,5 @@
#!/usr/bin/env bash
-
-#
-# igex(1): Run a command and ignore specified exit values, translating them to
-# 0. Don't touch any stderr, though. Good for wrapping around rsync(1), like to
-# ignore exit value 24.
-#
-# -h gives help, -v gives you stderr specifying success or failure, -i specifies
-# the signals to ignore; you must specify at least one none-zero integer.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
+# Run a command and ignore specified exit values.
self=igex
# Print usage information
diff --git a/bin/maybe b/bin/maybe
index 3ed31303..2fc75047 100755
--- a/bin/maybe
+++ b/bin/maybe
@@ -1,17 +1,5 @@
#!/usr/bin/env bash
-
-#
-# maybe(1) -- Like true(1) or false(1); exit with either success or failure
-# randomly. Good for basic testing, but doesn't use precise probabilities, just
-# fractions of RANDOM's limit. Exits with 2 on usage errors so you can tell the
-# difference.
-#
-# -h gives help, -v gives you stdout specifying success or failure.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
+# Exit with success or failure with a given probability
self=maybe
# Print usage information
diff --git a/bin/murl b/bin/murl
index 2fe49adf..610ef6e4 100755
--- a/bin/murl
+++ b/bin/murl
@@ -1,15 +1,6 @@
#!/bin/sh
-
-#
# Format markdown and pass it to hurl to extract URLs from it.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
-# Pipe the output of pandoc(1) on our args ...
+# Pipe the output of pandoc(1) on our args into hurl(1)
pandoc -f markdown -t html -- "${@:-/dev/stdin}" |
-
-# ... into our own hurl
hurl
diff --git a/bin/stbl b/bin/stbl
index 3bf0902a..4d56de17 100755
--- a/bin/stbl
+++ b/bin/stbl
@@ -1,15 +1,5 @@
#!/usr/bin/env bash
-
-#
-# stbl(1) - Strip a trailing blank line from the given files with ed(1).
-#
-# -h gives help, -v prints the names of the files on stderr as they're
-# processed.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
+# Strip a trailing blank line from the given files with ed(1)
self=stbl
# Print usage information
diff --git a/bin/tl b/bin/tl
index bac7350f..a341a3bb 100755
--- a/bin/tl
+++ b/bin/tl
@@ -1,19 +1,5 @@
#!/usr/bin/env bash
-
-#
-# tl(1): Tag lines from files or stdin with a string prefix or suffix before
-# writing them to stdout. Specifying neither prefix nor suffix is acceptable,
-# in which case the stream is simply reproduced on stdout, acting like cat(1).
-#
-# Option -h gives help. Specify a prefix with -p, and/or a suffix with -s. If
-# no file arguments are given, defaults to reading standard input.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
-
-# Name self
+# Tag lines from files or stdin with a string prefix or suffix.
self=tl
# Define usage function
diff --git a/bin/tlcs b/bin/tlcs
index 6a22f4ec..f67b2d36 100755
--- a/bin/tlcs
+++ b/bin/tlcs
@@ -1,20 +1,5 @@
#!/usr/bin/env bash
-
-#
-# tlcs(1): Execute a command and tag the output of the stdout and stderr
-# streams, line by line, using tl(1) under the hood. Add -c when writing to a
-# terminal to color the lines.
-#
-# Option -h gives help. Specify a stdout prefix with -o (default "stdout: "),
-# and/or a stderr prefix with -e (default "stderr: "). Option -c prints stdout
-# lines in green and stderr lines in red if the respective streams are writing
-# to appropriate terminals. Remaining arguments are assumed to be a command and
-# its arguments.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
+# Execute a command and tag the output of the stdout and stderr streams.
self=tlcs
# Define usage function
diff --git a/bin/try b/bin/try
index 6efc0aab..25e9fadd 100755
--- a/bin/try
+++ b/bin/try
@@ -1,19 +1,5 @@
#!/usr/bin/env bash
-
-#
-# try(1) -- Attempt a certain number of times to perform a task, stopping after
-# the first success, and only print collected stderr if all the attempts
-# failed. Designed for running from systems like cron(8) where blips and
-# short-term failures can be ignored.
-#
-# -h gives help, -v gives you diagnostics on stdout, -i sets an optional number
-# of seconds between each attempt, -n sets the number of attempts (defaults to
-# 3).
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
+# Attempt a certain number of times to perform a task
self=try
# Print usage information
diff --git a/bin/urlc b/bin/urlc
index 24b48982..7a62b749 100755
--- a/bin/urlc
+++ b/bin/urlc
@@ -1,16 +1,5 @@
#!/usr/bin/env bash
-
-#
-# Given a list of files or stdin containing a newline-separated list of URLs,
-# try to find erroneous, redirecting, or insecure URLs with working secure
-# alternatives.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2016
-# License: Public domain
-#
-
-# Name self
+# Try to find erroneous or insecure URLs
self=urlc
# cURL request timeout